From a144f55e651427f73bfb62af09fec8041e548243 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 8 Jun 2013 19:07:52 -0400 Subject: cleanup --- lib/sqlalchemy/sql/visitors.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'lib/sqlalchemy/sql/visitors.py') diff --git a/lib/sqlalchemy/sql/visitors.py b/lib/sqlalchemy/sql/visitors.py index c5a45ffd4..24ada8d9f 100644 --- a/lib/sqlalchemy/sql/visitors.py +++ b/lib/sqlalchemy/sql/visitors.py @@ -256,12 +256,8 @@ def cloned_traverse(obj, opts, visitors): """clone the given expression structure, allowing modifications by visitors.""" - - if "cloned" in opts: - cloned = opts['cloned'] - else: - cloned = util.column_dict() - stop_on = util.column_set(opts.get('stop_on', [])) + cloned = {} + stop_on = set(opts.get('stop_on', [])) def clone(elem): if elem in stop_on: @@ -284,14 +280,12 @@ def replacement_traverse(obj, opts, replace): """clone the given expression structure, allowing element replacement by a given replacement function.""" - cloned = util.column_dict() - stop_on = util.column_set([id(x) for x in opts.get('stop_on', [])]) - unconditional = opts.get('unconditional', False) + cloned = {} + stop_on = set([id(x) for x in opts.get('stop_on', [])]) def clone(elem, **kw): if id(elem) in stop_on or \ - (not unconditional - and 'no_replacement_traverse' in elem._annotations): + 'no_replacement_traverse' in elem._annotations: return elem else: newelem = replace(elem) -- cgit v1.2.1