On 21 March 2015 at 00:03, Martin Teichmann <lkb.teichm...@gmail.com> wrote: > The current python fails the assertion, while with my patch everything is > fine, > and I personally think __class__ should always actually refer to the class > being > defined, which means at the minimum that it is actually, well, a class.
For folks that haven't looked at the tracker issue: I personally like the change, but it does involve storing the cell object in a dunder-variable in the class namespace while it's being defined (until type.__new__ executes and both populates it and removes it from the class namespace). Since it introduces new behaviour that's visible to Python level code, I've suggested that Martin roll the suggestion into his current PEP 487 (which adds __init_subclass__ to similarly tidy up a few challenges with the way classes are currently initialised). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com