list of all type names
Peter Hansen
peter at engcorp.com
Tue Mar 1 12:17:32 EST 2005
Peter Maas wrote:
> I would avoid the use of generic names for variables but rather use
> dict1 or aDict etc. If you want to avoid a name collision without
> the use of naming conventions you could rename __builtins__:
>
> bi = __builtins__
> del __builtins__
>
> Then you can define what you like but you will have to reference dict,
> list etc. as bi.dict, bi.list, ...
Except that you should never access __builtins__, and the
module is actually called __builtin__. See this thread
for what should probably be considered the canonical
comment on this topic:
http://groups.google.ca/groups?threadm=mailman.1021141460.1004.python-list%40python.org
-Peter
More information about the Python-list
mailing list