injecting "set" into 2.3's builtins?

Skip Montanaro skip at pobox.com
Fri Mar 11 16:27:18 EST 2005


    Stephen> I have:
    Stephen> try:
    Stephen>     set
    Stephen> except NameError:
    Stephen>     from sets import Set as set

    Stephen> in my code in a few places.

Yes, but then pychecker complains about a statement with no apparent effect,
hence the extra verbiage.

My question wasn't about a less ugly way to type what I type now.  It was
about whether injecting "set" into the builtins (so I can dispense with the
above cruft altogether) is likely to cause problems.  I think not, certainly
based on what little surveying I've done at work.  I was hoping someone else
had already tried this and could report on their experience.

Skip



More information about the Python-list mailing list