backport of 'set' to python 2.3?
Larry Bates
larry.bates at websafe.com`
Wed May 21 21:57:38 EDT 2008
Daniel Fetchinson wrote:
> Does anyone have a pure python implementation of the builtin 'set'
> object so that I could use that in python 2.3? If this would be the
> case that would be really great as I wouldn't have to change my code
> that runs happily on 2.5 and makes use of 'set'. Speed and performance
> doesn't matter, any implementation that does exactly the same as the
> builtin 'set' in 2.5 would be great.
>
> Cheers,
> Daniel
From "What's new in Python 2.4":
Python 2.3 introduced the sets module. C implementations of set data types have
now been added to the Python core as two new built-in types, set(iterable) and
frozenset(iterable). They provide high speed operations for membership testing,
for eliminating duplicates from sequences, and for mathematical operations like
unions, intersections, differences, and symmetric differences.
You should be able to use sets module in 2.3.
-Larry
More information about the Python-list
mailing list