summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2008-07-15 18:21:24 +0000
committerJason Kirtland <jek@discorporate.us>2008-07-15 18:21:24 +0000
commit6917ffb9bdae19a368abef5fdbd4655fc27fcdf2 (patch)
tree30e61c46eb43cc5d83dc4ae6464aa55e77a5efc5 /lib/sqlalchemy/util.py
parent4fe412795883a75057829f13251bf4a3038931d8 (diff)
downloadsqlalchemy-6917ffb9bdae19a368abef5fdbd4655fc27fcdf2.tar.gz
And thus ends support for Python 2.3.
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r--lib/sqlalchemy/util.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py
index c9982a9fa..7a6b964aa 100644
--- a/lib/sqlalchemy/util.py
+++ b/lib/sqlalchemy/util.py
@@ -525,7 +525,7 @@ def dictlike_iteritems(dictlike):
yield key, getter(key)
return iterator()
elif hasattr(dictlike, 'keys'):
- return iter([(key, getter(key)) for key in dictlike.keys()])
+ return iter((key, getter(key)) for key in dictlike.keys())
else:
raise TypeError(
"Object '%r' is not dict-like" % dictlike)
@@ -535,7 +535,7 @@ def assert_arg_type(arg, argtype, name):
return arg
else:
if isinstance(argtype, tuple):
- raise exc.ArgumentError("Argument '%s' is expected to be one of type %s, got '%s'" % (name, ' or '.join(["'%s'" % str(a) for a in argtype]), str(type(arg))))
+ raise exc.ArgumentError("Argument '%s' is expected to be one of type %s, got '%s'" % (name, ' or '.join("'%s'" % str(a) for a in argtype), str(type(arg))))
else:
raise exc.ArgumentError("Argument '%s' is expected to be of type '%s', got '%s'" % (name, str(argtype), str(type(arg))))
@@ -856,21 +856,21 @@ class OrderedSet(Set):
def intersection(self, other):
other = Set(other)
- return self.__class__([a for a in self if a in other])
+ return self.__class__(a for a in self if a in other)
__and__ = intersection
def symmetric_difference(self, other):
other = Set(other)
- result = self.__class__([a for a in self if a not in other])
- result.update([a for a in other if a not in self])
+ result = self.__class__(a for a in self if a not in other)
+ result.update(a for a in other if a not in self)
return result
__xor__ = symmetric_difference
def difference(self, other):
other = Set(other)
- return self.__class__([a for a in self if a not in other])
+ return self.__class__(a for a in self if a not in other)
__sub__ = difference
@@ -1233,7 +1233,7 @@ class WeakCompositeKey(object):
return cmp(tuple(self), tuple(other))
def __iter__(self):
- return iter([arg() for arg in self.args])
+ return iter(arg() for arg in self.args)
class _symbol(object):
def __init__(self, name):