[Python-3000] Change to class construction? (original) (raw)
Phillip J. Eby pje at telecommunity.com
Mon Jul 9 17:07:06 CEST 2007
- Previous message: [Python-3000] Change to class construction?
- Next message: [Python-3000] Change to class construction?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 09:03 PM 7/9/2007 +1000, Nick Coghlan wrote:
However, I will point out that setting class attributes via locals() is formally undefined (it happens to work in current versions of CPython, but there's no guarantee that will always be the case).
As of PEP 3115, it's no longer undefined for class statements.
Of course, if it were truly undefined to begin with, we wouldn't be so worried about how to implement the potential optimizations that the undefinedness theoretically implies. :) (i.e. optimized globals/locals)
- Previous message: [Python-3000] Change to class construction?
- Next message: [Python-3000] Change to class construction?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]