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

Function iter_format

Lib/test/test_buffer.py:230–237  ·  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

228 yield randitems(n, obj, mode, char)
229
230def iter_format(nitems, testobj='ndarray'):
231 """Yield (format, items, item) for all possible modes and format
232 characters plus one random compound format string."""
233 for t in iter_mode(nitems, testobj):
234 yield t
235 if testobj != 'ndarray':
236 return
237 yield struct_items(nitems, testobj)
238
239
240def is_byte_format(fmt):

Calls 2

iter_modeFunction · 0.85
struct_itemsFunction · 0.85

Tested by

no test coverage detected