Premiere version : mise en route du suivi.
[auf_roundup.git] / roundup / anypy / sets_.py
1 """
2 anypy.sets_: sets compatibility module
3
4 uses the built-in type 'set' if available, and thus avoids
5 deprecation warnings. Simple usage:
6
7 Change all
8 from sets import Set
9 to
10 from roundup.anypy.sets_ import set
11
12 and use 'set' instead of 'Set'.
13 To avoid unnecessary imports, you can:
14
15 try:
16 set
17 except NameError:
18 from roundup.anypy.sets_ import set
19
20 see:
21 http://docs.python.org/library/sets.html#comparison-to-the-built-in-set-types
22
23 """
24
25 try:
26 set = set # built-in since Python 2.4
27 except NameError, TypeError:
28 from sets import Set as set # deprecated as of Python 2.6
29
30 # vim: ts=8 sts=4 sw=4 si et