From: Jonathan Ellis Date: Fri, 3 Aug 2007 14:02:28 +0000 (+0000) Subject: only one instance of while len(...) X-Git-Tag: rel_0_4beta1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4d849748c6cd6884da33cf0cf0cdaf8e319cf19;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git only one instance of while len(...) --- diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py index dcfe9ea715..87efc802ba 100644 --- a/lib/sqlalchemy/topological.py +++ b/lib/sqlalchemy/topological.py @@ -198,8 +198,8 @@ class QueueDependencySorter(object): queue.append(n) cycles = {} output = [] - while len(nodes) > 0: - if len(queue) == 0: + while nodes: + if not queue: # edges remain but no edgeless nodes to remove; this indicates # a cycle if allow_all_cycles: