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

Function is_memoryview_format

Lib/test/test_buffer.py:243–247  ·  view source on GitHub ↗

format suitable for memoryview

(fmt)

Source from the content-addressed store, hash-verified

241 return 'c' in fmt or 'b' in fmt or 'B' in fmt
242
243def is_memoryview_format(fmt):
244 """format suitable for memoryview"""
245 x = len(fmt)
246 return ((x == 1 or (x == 2 and fmt[0] == '@')) and
247 fmt[x-1] in MEMORYVIEW)
248
249NON_BYTE_FORMAT = [c for c in fmtdict['@'] if not is_byte_format(c)]
250

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected