From a8408a8abe83c98af50821f1eb1df53cf9d202dd Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 21 May 2014 22:24:36 +0300 Subject: objtype: super: Fall back to "object" lookup as last resort. Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520. --- tests/basics/class_super_object.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/basics/class_super_object.py (limited to 'tests/basics/class_super_object.py') diff --git a/tests/basics/class_super_object.py b/tests/basics/class_super_object.py new file mode 100644 index 0000000000..21b97328ea --- /dev/null +++ b/tests/basics/class_super_object.py @@ -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() -- cgit v1.2.3