Note that Python 2.4 has set built-in with the name 'set'. To be compatible with both you could write
try:
set
except NameError:
from sets import Set as set
Clarification: you don't _have_ to do this to be compatible with 2.4. The sets module is in both 2.3 and 2.4. The difference in 2.4 is that set is also a built-in data type implemented in C with the same interface as sets.Set. The code above will take advantage of the built-in set if it is available, otherwise use sets.Set.
Kent
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor