summaryrefslogtreecommitdiff
path: root/tests/basics/subclass_native_init.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-11-30 10:31:42 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-12 16:43:16 +1100
commitd32d22dfd79439e07739166eaa3f7e41466c7ec8 (patch)
treef34ee1c2af69d7f975f3762da70c5c947f58d8f0 /tests/basics/subclass_native_init.py
parentd3f82bc42576ccd80206a17a4941fd5c28c56530 (diff)
py/objtype: Implement better support for overriding native's __init__.
This patch cleans up and generalises part of the code which handles overriding and calling a native base-class's __init__ method. It defers the call to the native make_new() function until after the user (Python) __init__() method has run. That user method now has the chance to call the native __init__/make_new and pass it different arguments. If the user doesn't call the super().__init__ method then it will be called automatically after the user code finishes, to finalise construction of the instance.
Diffstat (limited to 'tests/basics/subclass_native_init.py')
0 files changed, 0 insertions, 0 deletions