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

Function fmt

Lib/profiling/sampling/_format_utils.py:4–5  ·  view source on GitHub ↗
(value: int | float, decimals: int = 1)

Source from the content-addressed store, hash-verified

2
3
4def fmt(value: int | float, decimals: int = 1) -> str:
5 return locale.format_string(f'%.{decimals}f', value, grouping=True)

Callers 8

_generate_index_htmlMethod · 0.85
_generate_file_htmlMethod · 0.85
sampleMethod · 0.85
_print_realtime_statsMethod · 0.85
_print_unwinder_statsMethod · 0.85
test_format_stackMethod · 0.85

Calls

no outgoing calls

Tested by 3

test_format_stackMethod · 0.68