(self, idx)
| 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): |