MCPcopy Create free account
hub / github.com/python/cpython / _format_data

Method _format_data

Tools/c-analyzer/c_parser/info.py:1286–1296  ·  view source on GitHub ↗
(cls, fmt, data, extra)

Source from the content-addressed store, hash-verified

1284
1285 @classmethod
1286 def _format_data(cls, fmt, data, extra):
1287 if fmt in ('line', 'brief'):
1288 yield repr(data)
1289 elif fmt == 'full':
1290 for enumerator in data:
1291 yield f'{enumerator}'
1292 elif fmt == 'row':
1293 # XXX This won't work with CSV...
1294 yield ','.join(data)
1295 else:
1296 raise NotImplementedError(fmt)
1297
1298 @classmethod
1299 def _unformat_data(cls, datastr, fmt=None):

Callers 2

_render_dataMethod · 0.45
_render_data_row_itemMethod · 0.45

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected