diff options
author | Jonathan Ellis <jbellis@gmail.com> | 2007-08-03 18:28:11 +0000 |
---|---|---|
committer | Jonathan Ellis <jbellis@gmail.com> | 2007-08-03 18:28:11 +0000 |
commit | b5a7efe591c95d1ff104ca67037f0d738f4d5ff1 (patch) | |
tree | 375f405c00c3eeb531be58b1b678323b1370f06e /lib/sqlalchemy/topological.py | |
parent | 2db06fce7e3cba15767c248c293caa27d35fe354 (diff) | |
download | sqlalchemy-b5a7efe591c95d1ff104ca67037f0d738f4d5ff1.tar.gz |
switch "if not len(x)" to "if not x"
Diffstat (limited to 'lib/sqlalchemy/topological.py')
-rw-r--r-- | lib/sqlalchemy/topological.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py index 87efc802b..ab62e662d 100644 --- a/lib/sqlalchemy/topological.py +++ b/lib/sqlalchemy/topological.py @@ -137,7 +137,7 @@ class _EdgeCollection(object): if children is not None: for child in children: self.child_to_parents[child].remove(node) - if not len(self.child_to_parents[child]): + if not self.child_to_parents[child]: yield child def __len__(self): @@ -237,7 +237,7 @@ class QueueDependencySorter(object): set as siblings to each other as possible. """ - if not len(nodes): + if not nodes: return None # a list of all currently independent subtrees as a tuple of # (root_node, set_of_all_tree_nodes, set_of_all_cycle_nodes_in_tree) |