On 21 March 2015 at 00:03, Martin Teichmann <lkb.teichmann at 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 | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4