[Python-Dev] bug or a feature?

Maciej Fijalkowski fijall at gmail.com
Wed Jun 11 03:10:17 CEST 2008


What do you think about this code:
class A:
 locals()[42] = 98
Seems people rely on it working. Do we consider it part of python
language? (Note that you cannot do the same with getattr/setattr which
checks if argument is a string)
Cheers,
fijal


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /