With surprising regularity, I see program postings (eg. on StackOverflow) from inexperienced Python users accidentally re-assigning built-in names.
For example, they'll innocently call some variable, "list", and assign a list of items to it. ...and if they're _unlucky_ enough, their program may actually work (encouraging them to re-use this name in other programs). If they try to use an actual keyword, both the interpreter and compiler are helpful enough to give them a syntax error, but I think the builtins should be "pseudo-reserved", and a user should explicitly have to do something *extra* to not receive a warning. I'd suggest: "from __future__ import allow_reassigning_builtins", but I think this abuse of the __future__ module likely isn't welcome. I know that for testing purposes, this functionality is very convenient, and I'm not suggesting it be removed. In these cases, it would be trivial to just require something explicit, telling the interpreter that the programmer was aware they were assigning to a builtin name. The situation is slightly different for modules that come with Python. Most of us would cringe when seeing something like: `string = "Some string"`; but at least the user has to explicitly import the string module for this to actually cause issues (other than readability). What sayest the Python community about having an explicit warning against such un-pythonic behaviour (re-assigning builtin names)? Regards, Gerrat
-- http://mail.python.org/mailman/listinfo/python-list