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

Function is_memoryview_format

Lib/test/test_buffer.py:255–259  ·  view source on GitHub ↗

format suitable for memoryview

(fmt)

Source from the content-addressed store, hash-verified

253 return 'c' in fmt or 'b' in fmt or 'B' in fmt
254
255def is_memoryview_format(fmt):
256 """format suitable for memoryview"""
257 x = len(fmt)
258 return ((x == 1 or (x == 2 and fmt[0] == '@')) and
259 fmt[x-1] in MEMORYVIEW)
260
261NON_BYTE_FORMAT = [c for c in fmtdict['@'] if not is_byte_format(c)]
262

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…