diff options
author | Monty Taylor <mordred@inaugust.com> | 2014-01-02 11:31:00 -0600 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2014-01-02 11:31:00 -0600 |
commit | 7dd57dcf5f50271d12a6c6bba3d3ca2b3a59348c (patch) | |
tree | 3b80095e3d4ae7e802a0003797bb25f66718ef22 /MySQLdb/converters.py | |
parent | b739fb06aa484e121395d17245d420aed6def202 (diff) | |
parent | 5ce7d5f8a6f7b5a48cc1ccbfb799ff613e682d2d (diff) | |
download | mysqldb1-7dd57dcf5f50271d12a6c6bba3d3ca2b3a59348c.tar.gz |
Merge https://github.com/farcepest/MySQLdb1 into merge-upstream
Diffstat (limited to 'MySQLdb/converters.py')
-rw-r--r-- | MySQLdb/converters.py | 7 |
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, |