MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / escape_float

Function escape_float

pymysql/converters.py:55–61  ·  view source on GitHub ↗
(value, mapping=None)

Source from the content-addressed store, hash-verified

53
54
55def escape_float(value, mapping=None):
56 s = repr(value)
57 if s in ("inf", "-inf", "nan"):
58 raise ProgrammingError(f"{s} can not be used with MySQL")
59 if "e" not in s:
60 s += "e0"
61 return s
62
63
64_escape_table = [chr(x) for x in range(128)]

Callers

nothing calls this directly

Calls 1

ProgrammingErrorClass · 0.85

Tested by

no test coverage detected