MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / put

Method put

tools/python-3.11.9-amd64/Lib/pickle.py:514–523  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

512
513 # Return a PUT (BINPUT, LONG_BINPUT) opcode string, with argument i.
514 def put(self, idx):
515 if self.proto >= 4:
516 return MEMOIZE
517 elif self.bin:
518 if idx < 256:
519 return BINPUT + pack("<B", idx)
520 else:
521 return LONG_BINPUT + pack("<I", idx)
522 else:
523 return PUT + repr(idx).encode("ascii") + b'\n'
524
525 # Return a GET (BINGET, LONG_BINGET) opcode string, with argument i.
526 def get(self, i):

Callers 1

memoizeMethod · 0.95

Calls 2

packFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected