def __init__(self, a = 5, b = 10):
self.a = a
self.b = b
InstanceOfFoo = Foo()
print(vars(InstanceOfFoo))
Run the program, the result is:
{'a': 5, 'b': 10}
See also: Built-in Python functions