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

Function _nbytes

Lib/compression/zstd/_zstdfile.py:13–17  ·  view source on GitHub ↗
(dat, /)

Source from the content-addressed store, hash-verified

11
12
13def _nbytes(dat, /):
14 if isinstance(dat, (bytes, bytearray)):
15 return len(dat)
16 with memoryview(dat) as mv:
17 return mv.nbytes
18
19
20class ZstdFile(_streams.BaseStream):

Callers 4

train_dictFunction · 0.90
finalize_dictFunction · 0.90
writeMethod · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…