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 <rep...@bugs.python.org> <http://bugs.python.org/issue23722> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com