Mercurial > p > mysql-python > mysqldb-2
comparison MySQLdb/__init__.py @ 51:6122b2cacd20 MySQLdb
set and frozenset always available in Python 2.4 and newer
author | adustman |
---|---|
date | Sun, 22 Feb 2009 20:09:56 +0000 |
parents | df4d804244ec |
children | 228a45771d14 |
comparison
equal
deleted
inserted
replaced
50:0f9808c4799c | 51:6122b2cacd20 |
---|---|
28 | 28 |
29 from MySQLdb.constants import FIELD_TYPE | 29 from MySQLdb.constants import FIELD_TYPE |
30 from MySQLdb.times import Date, Time, Timestamp, \ | 30 from MySQLdb.times import Date, Time, Timestamp, \ |
31 DateFromTicks, TimeFromTicks, TimestampFromTicks | 31 DateFromTicks, TimeFromTicks, TimestampFromTicks |
32 | 32 |
33 try: | |
34 frozenset | |
35 except NameError: | |
36 from sets import ImmutableSet as frozenset | |
37 | 33 |
38 class DBAPISet(frozenset): | 34 class DBAPISet(frozenset): |
39 """A special type of set for which A == x is True if A is a | 35 """A special type of set for which A == x is True if A is a |
40 DBAPISet and x is a member of that set. | 36 DBAPISet and x is a member of that set. |
41 """ | 37 """ |