[New-bugs-announce] [issue23722] During metaclass.__init__, super() of the constructed class does not work
Martin Teichmann
report at bugs.python.org
Fri Mar 20 14:44:21 CET 2015
New submission from Martin Teichmann:
When a new class is initialized with __init__ in a metaclass,
the __class__ cell of the class about to be initialized is not
set yet, meaning that super() does not work.
This is a known but fixable problem. The attached patch moves
the initialization of __class__ from the end of __build_class__
into type.__new__. This avoids the proliferation of methods
which don't have the __class__ cell set.
----------
components: Interpreter Core
files: patch
messages: 238672
nosy: Martin.Teichmann
priority: normal
severity: normal
status: open
title: During metaclass.__init__, super() of the constructed class does not work
versions: Python 3.5
Added file: http://bugs.python.org/file38604/patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23722>
_______________________________________
More information about the New-bugs-announce
mailing list