ugly python namespace bug

Jeff jam at quark.emich.edu
Tue Dec 21 11:35:10 EST 1999


On Wed, Dec 22, 1999 at 02:22:24AM +1000, Rob Hodges wrote:
[..snipped...]
> I think it would be more appropriate if you could, in each file,
> optionally place a statement that tells the interpreter to treat
> built-ins as keywords.  Then it would stop you dead in your tracks if
> you tried to change them, without breaking any old code.  What's
> another quick statement after the sh'bang and before the imports eh?
> 
> -Rob
> 

personally, instead of adding a directive like this, what about a command
line option to the interpreter that will check for usage like that? it would
have to tie into the syntax of the language, but it would spit out a warning
if it detected a script using a keyword as a variable (like 'dir' or
'type'), and then the programmer has the option to either leave it like that
or fix it. this seems a heck of a lot simpler. thoughts?

regards,
J
-- 
|| visit gfd <http://quark.emich.edu/>
|| psa member -- <http://www.python.org/psa/> 
|| New Image Systems & Services, Inc. <http://www.newimage.com/>




More information about the Python-list mailing list