list comprehention

Peter Otten __peter__ at web.de
Thu Jan 19 12:46:19 EST 2006


Tim Chase wrote:

> I'm a tad confused by the help, as it sounds like sets are
> supposed to be first-class citizens, but in ver2.3.5 that I'm
> running here (or rather "there", on a friend's box), I have to
> "import sets" which I didn't see mentioned in the reference manual.

set and frozenset are a builtins starting with Python 2.4.

http://www.python.org/2.4/highlights.html

"""
New or upgraded built-ins

built-in sets - the sets module, introduced in 2.3, has now been implemented
in C, and the set and frozenset types are available as built-in types (PEP
218)
"""

Peter




More information about the Python-list mailing list