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

Function _parse_fmt

Tools/c-analyzer/c_common/tables.py:382–390  ·  view source on GitHub ↗
(fmt)

Source from the content-addressed store, hash-verified

380
381
382def _parse_fmt(fmt):
383 if fmt.startswith(tuple('<^>')):
384 align = fmt[0]
385 width = fmt[1:]
386 if width.isdigit():
387 return int(width), align
388 elif fmt.isdigit():
389 return int(fmt), '<'
390 return None
391
392
393def _resolve_width(width, fmt, label, default):

Callers 4

_parseMethod · 0.85
_normalizeMethod · 0.85
widthMethod · 0.85
_resolve_widthFunction · 0.85

Calls 2

isdigitMethod · 0.80
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…