summaryrefslogtreecommitdiff
path: root/MySQLdb/converters.py
diff options
context:
space:
mode:
Diffstat (limited to 'MySQLdb/converters.py')
-rw-r--r--MySQLdb/converters.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/MySQLdb/converters.py b/MySQLdb/converters.py
index 491d49b..26c1f90 100644
--- a/MySQLdb/converters.py
+++ b/MySQLdb/converters.py
@@ -129,13 +129,16 @@ def char_array(s):
def array2Str(o, d):
return Thing2Literal(o.tostring(), d)
+def quote_tuple(t, d):
+ return "(%s)" % (','.join(escape_sequence(t, d)))
+
conversions = {
IntType: Thing2Str,
LongType: Long2Int,
FloatType: Float2Str,
NoneType: None2NULL,
- TupleType: escape_sequence,
- ListType: escape_sequence,
+ TupleType: quote_tuple,
+ ListType: quote_tuple,
DictType: escape_dict,
InstanceType: Instance2Str,
ArrayType: array2Str,