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

Function _format_sign

Lib/_pydecimal.py:6329–6337  ·  view source on GitHub ↗

Determine sign character.

(is_negative, spec)

Source from the content-addressed store, hash-verified

6327 return sep.join(reversed(groups))
6328
6329def _format_sign(is_negative, spec):
6330 """Determine sign character."""
6331
6332 if is_negative:
6333 return '-'
6334 elif spec['sign'] in ' +':
6335 return spec['sign']
6336 else:
6337 return ''
6338
6339def _format_number(is_negative, intpart, fracpart, exp, spec):
6340 """Format a number, given the following data:

Callers 2

__format__Method · 0.85
_format_numberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…