diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-07-15 18:21:24 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-07-15 18:21:24 +0000 |
commit | 6917ffb9bdae19a368abef5fdbd4655fc27fcdf2 (patch) | |
tree | 30e61c46eb43cc5d83dc4ae6464aa55e77a5efc5 /lib/sqlalchemy/topological.py | |
parent | 4fe412795883a75057829f13251bf4a3038931d8 (diff) | |
download | sqlalchemy-6917ffb9bdae19a368abef5fdbd4655fc27fcdf2.tar.gz |
And thus ends support for Python 2.3.
Diffstat (limited to 'lib/sqlalchemy/topological.py')
-rw-r--r-- | lib/sqlalchemy/topological.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py index 9ef3dfaf4..c4c610b35 100644 --- a/lib/sqlalchemy/topological.py +++ b/lib/sqlalchemy/topological.py @@ -76,7 +76,7 @@ class _Node(object): str(self.item) + \ (self.cycles is not None and (" (cycles: " + repr([x for x in self.cycles]) + ")") or "") + \ "\n" + \ - ''.join([str(n) for n in self.children]) + ''.join(str(n) for n in self.children) def __repr__(self): return "%s" % (str(self.item)) @@ -150,7 +150,7 @@ class _EdgeCollection(object): yield child def __len__(self): - return sum([len(x) for x in self.parent_to_children.values()]) + return sum(len(x) for x in self.parent_to_children.values()) def __iter__(self): for parent, children in self.parent_to_children.iteritems(): @@ -301,7 +301,7 @@ def _find_cycles(edges): traverse(parent) # sets are not hashable, so uniquify with id - unique_cycles = dict([(id(s), s) for s in cycles.values()]).values() + unique_cycles = dict((id(s), s) for s in cycles.values()).values() for cycle in unique_cycles: edgecollection = [edge for edge in edges if edge[0] in cycle and edge[1] in cycle] |