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

Function iter_format

Lib/test/test_buffer.py:242–249  ·  view source on GitHub ↗

Yield (format, items, item) for all possible modes and format characters plus one random compound format string.

(nitems, testobj='ndarray')

Source from the content-addressed store, hash-verified

240 yield randitems(n, obj, mode, char)
241
242def iter_format(nitems, testobj='ndarray'):
243 """Yield (format, items, item) for all possible modes and format
244 characters plus one random compound format string."""
245 for t in iter_mode(nitems, testobj):
246 yield t
247 if testobj != 'ndarray':
248 return
249 yield struct_items(nitems, testobj)
250
251
252def is_byte_format(fmt):

Calls 2

iter_modeFunction · 0.85
struct_itemsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…