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

Method put

Lib/pickle.py:525–534  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

523
524 # Return a PUT (BINPUT, LONG_BINPUT) opcode string, with argument i.
525 def put(self, idx):
526 if self.proto >= 4:
527 return MEMOIZE
528 elif self.bin:
529 if idx < 256:
530 return BINPUT + pack("<B", idx)
531 else:
532 return LONG_BINPUT + pack("<I", idx)
533 else:
534 return PUT + repr(idx).encode("ascii") + b'\n'
535
536 # Return a GET (BINGET, LONG_BINGET) opcode string, with argument i.
537 def get(self, i):

Callers 1

memoizeMethod · 0.95

Calls 3

packFunction · 0.90
reprFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected