MCPcopy Index your code
hub / github.com/python/cpython / _normalize_float_str

Function _normalize_float_str

Lib/test/test_tomllib/burntsushi.py:96–103  ·  view source on GitHub ↗
(float_str: str)

Source from the content-addressed store, hash-verified

94
95
96def _normalize_float_str(float_str: str) -> str:
97 as_float = float(float_str)
98
99 # Normalize "-0.0" and "+0.0"
100 if as_float == 0:
101 return "0"
102
103 return str(as_float)

Callers 2

convertFunction · 0.85
normalizeFunction · 0.85

Calls 1

strFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…