micropython/tests/basics/class_super_object.py
Paul Sokolovsky a8408a8abe objtype: super: Fall back to "object" lookup as last resort.
Also, define object.__init__() (semantically empty, purely CPython compat
measure). Addresses #520.
2014-05-21 22:27:03 +03:00

16 lines
274 B
Python

# Calling object.__init__() via super().__init__
class Test(object):
def __init__(self):
super().__init__()
print("Test.__init__")
t = Test()
class Test2:
def __init__(self):
super().__init__()
print("Test2.__init__")
t = Test2()