summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2003-06-09 18:42:19 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2003-06-09 18:42:19 (GMT)
commit4e3363e884062e1ad6002fc8cc85201a2dea43d7 (patch)
treea331ac5a6d90ffdb6f241f6e392100f05835678a /Misc
parentc4370d94e1ae7f6ab02f054c64986abcf0f0c7f2 (diff)
downloadcpython-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/NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 6c9f5e5..35b35b8 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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
-----------------