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

Function _format

Lib/locale.py:181–188  ·  view source on GitHub ↗
(percent, value, grouping=False, monetary=False, *additional)

Source from the content-addressed store, hash-verified

179_percent_re = None
180
181def _format(percent, value, grouping=False, monetary=False, *additional):
182 if additional:
183 formatted = percent % ((value,) + additional)
184 else:
185 formatted = percent % value
186 if percent[-1] in 'eEfFgGdiu':
187 formatted = _localize(formatted, grouping, monetary)
188 return formatted
189
190# Transform formatted as locale number according to the locale settings
191def _localize(formatted, grouping=False, monetary=False):

Callers 2

format_stringFunction · 0.70
strFunction · 0.70

Calls 1

_localizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…