diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2003-06-09 18:42:19 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2003-06-09 18:42:19 (GMT) |
commit | 4e3363e884062e1ad6002fc8cc85201a2dea43d7 (patch) | |
tree | a331ac5a6d90ffdb6f241f6e392100f05835678a /Misc | |
parent | c4370d94e1ae7f6ab02f054c64986abcf0f0c7f2 (diff) | |
download | cpython-4e3363e884062e1ad6002fc8cc85201a2dea43d7.zip cpython-4e3363e884062e1ad6002fc8cc85201a2dea43d7.tar.gz cpython-4e3363e884062e1ad6002fc8cc85201a2dea43d7.tar.bz2 |
Warn about creating global variables by __setattr__ that shadow builtin
names. Unfortunately, this is not bulletproof since the module
dictionary can be modified directly.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -43,6 +43,12 @@ Core and builtins instead of going through __getitem__. If __getitem__ access is preferred, then __iter__ can be overriden. +- Creating an attribute on a module (i.e. a global variable created by + __setattr__) that causes a builtin name to be shadowed now raises a + DeprecationWarning. In future versions of Python the effect may be + undefined (in order to allow for optimization of global and builtin + name lookups). + Extension modules ----------------- |