diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-11 20:46:43 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-06-11 20:46:43 -0400 |
commit | ce985cc71a11c147da44359d012fa14ee439a8d5 (patch) | |
tree | 8da16491ede27d706f8650099033ba7699854e01 /lib/sqlalchemy/engine/base.py | |
parent | b8e6bbe58a5809f53a56545b02f08909f1224a10 (diff) | |
download | sqlalchemy-ce985cc71a11c147da44359d012fa14ee439a8d5.tar.gz |
sigh. go back to __iter__ because of silly rowproxy as argument requirement
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 830009a2b..a475dd21b 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1476,7 +1476,8 @@ class Connection(Connectable): elif len(multiparams) == 1: zero = multiparams[0] if isinstance(zero, (list, tuple)): - if not zero or isinstance(zero[0], (list, tuple, dict)): + if not zero or hasattr(zero[0], '__iter__') and \ + not hasattr(zero[0], 'strip'): # execute(stmt, [{}, {}, {}, ...]) # execute(stmt, [(), (), (), ...]) return zero @@ -1490,7 +1491,8 @@ class Connection(Connectable): # execute(stmt, "value") return [[zero]] else: - if isinstance(multiparams[0], (list, tuple, dict)): + if hasattr(multiparams[0], '__iter__') and \ + not hasattr(multiparams[0], 'strip'): return multiparams else: return [multiparams] |