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:
Paul Sokolovsky
2014-05-21 22:24:36 +03:00
parent 6a410789b8
commit a8408a8abe
3 changed files with 32 additions and 0 deletions

View 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()