objtype: super: Fall back to "object" lookup as last resort.
Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520.
This commit is contained in:
15
tests/basics/class_super_object.py
Normal file
15
tests/basics/class_super_object.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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()
|
||||
Reference in New Issue
Block a user