[Python-Dev] PEP 8 updates/clarifications
Guido van Rossum
guido at python.org
Thu Dec 15 05:31:03 CET 2005
On 12/14/05, François Pinard <pinard at iro.umontreal.ca> wrote:
> I do not understand your statement that module/package names can only
> conflict with *global* user variable names. Local variables hide global
> variables with same names, and imported modules are often global
> variables. So, using a local name in a function prevents accessing
> a module by the same name (defined either locally or globally).
In a module where you import 'foo' I don't understand why you would
name a local variable 'foo'. So I'm not sure how the conflict would
arise.
Perhaps more to the point, I would expect that non-words are just as
likely to accidentally conflict with variable or function names, your
personal habits notwithstanding.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list