(self, idx)
| 539 | |
| 540 | # Return a PUT (BINPUT, LONG_BINPUT) opcode string, with argument i. |
| 541 | def put(self, idx): |
| 542 | if self.proto >= 4: |
| 543 | return MEMOIZE |
| 544 | elif self.bin: |
| 545 | if idx < 256: |
| 546 | return BINPUT + pack("<B", idx) |
| 547 | else: |
| 548 | return LONG_BINPUT + pack("<I", idx) |
| 549 | else: |
| 550 | return PUT + repr(idx).encode("ascii") + b'\n' |
| 551 | |
| 552 | # Return a GET (BINGET, LONG_BINGET) opcode string, with argument i. |
| 553 | def get(self, i): |