mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 03:50:43 +08:00
Use shorter format for float converter (#273)
This commit is contained in:

committed by
INADA Naoki

parent
777b74f53e
commit
09018914e1
@ -66,7 +66,10 @@ def Unicode2Str(s, d):
|
||||
return s.encode()
|
||||
|
||||
def Float2Str(o, d):
|
||||
return '%.16e' % o
|
||||
s = repr(o)
|
||||
if 'e' not in s:
|
||||
s += 'e0'
|
||||
return s
|
||||
|
||||
def None2NULL(o, d):
|
||||
"""Convert None to NULL."""
|
||||
|
Reference in New Issue
Block a user