summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r--lib/sqlalchemy/engine/base.py6
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]