MCPcopy Index your code
hub / github.com/RustPython/RustPython / _format_sign

Function _format_sign

Lib/_pydecimal.py:6326–6334  ·  view source on GitHub ↗

Determine sign character.

(is_negative, spec)

Source from the content-addressed store, hash-verified

6324 return sep.join(reversed(groups))
6325
6326def _format_sign(is_negative, spec):
6327 """Determine sign character."""
6328
6329 if is_negative:
6330 return '-'
6331 elif spec['sign'] in ' +':
6332 return spec['sign']
6333 else:
6334 return ''
6335
6336def _format_number(is_negative, intpart, fracpart, exp, spec):
6337 """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