On Mar 9, 2005, at 8:03 AM, Skip Montanaro wrote:
Anthony> Goal 4: Try and prevent something like
Anthony> try:
Anthony> True, False
Anthony> except NameError:
Anthony> True, False = 1, 0
Anthony> from ever ever happening again.
I will point out that in the transition from 2.3 to 2.4 our code that
uses
sets has
try:
x = set
except NameError:
from sets import Set as set
else:
del x
Rather ugly. I suppose I could just put the necessary incantation in
sitecustomize to dump the set name in builtins, but it would be kinda
nice
if this sort of thing could be avoided in the future.
try:
set
except NameError:
from sets import Set as set
You don't need the rest.
-bob
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com