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

Function escape_float

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

Source from the content-addressed store, hash-verified

58
59
60def escape_float(value, mapping=None):
61 s = repr(value)
62 if s in ("inf", "-inf", "nan"):
63 raise ProgrammingError(f"{s} can not be used with MySQL")
64 if "e" not in s:
65 s += "e0"
66 return s
67
68
69_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