Lines Matching refs:code
24 # - A pickle optimizer: for example, tuple-building code is sometimes more
139 copy_reg.safe_constructors are removed from the unpickling code.
608 implementations don't share the code -- they should). It's
829 # the code used in a bytestream to represent the opcode; a
831 'code',
854 def __init__(self, name, code, arg,
859 assert isinstance(code, str)
860 assert len(code) == 1
861 self.code = code
888 code='I',
913 code='J',
927 code='K',
939 code='M',
952 code='L',
970 code='\x8a',
981 code='\x8b',
994 code='S',
1007 code='T',
1020 code='U',
1035 code='N',
1046 code='\x88',
1056 code='\x89',
1068 code='V',
1081 code='X',
1096 code='F',
1116 code='G',
1134 code=']',
1142 code='a',
1156 code='e',
1170 code='l',
1188 code=')',
1196 code='t',
1212 code='\x85',
1219 This code pops one value off the stack and pushes a tuple of
1227 code='\x86',
1234 This code pops two values off the stack and pushes a tuple of
1242 code='\x87',
1249 This code pops three values off the stack and pushes a tuple of
1259 code='}',
1267 code='d',
1284 code='s',
1298 code='u',
1321 code='0',
1329 code='2',
1337 code='(',
1350 code='1',
1366 code='g',
1379 code='h',
1391 code='j',
1403 code='p',
1416 code='q',
1428 code='r',
1443 code='\x82',
1448 doc="""Extension code.
1450 This code and the similar EXT2 and EXT4 allow using a registry
1457 code registry ought to be global, although a range of codes may
1465 code='\x83',
1470 doc="""Extension code.
1476 code='\x84',
1481 doc="""Extension code.
1490 code='c',
1506 # and comprehensibly -- you really have to read the pickle code to
1510 code='R',
1527 opcode is followed by code to create setstate's argument, and then a
1539 code='b',
1571 code='i',
1606 like the code ends up calling the class object's __init__ anyway,
1610 or the class object does have a __getinitargs__ attribute), the code
1627 code='o',
1660 code='\x81',
1677 code='\x80',
1689 code='.',
1704 code='P',
1721 code='Q',
1736 # Verify uniqueness of .name and .code members.
1744 if d.code in code2i:
1745 raise ValueError("repeated code %r at indices %d and %d" %
1746 (d.code, code2i[d.code], i))
1749 code2i[d.code] = i
1760 code2op[d.code] = d
1776 "code" % (name, picklecode))
1780 print "checking name %r w/ code %r for consistency" % (
1784 raise ValueError("for pickle code %r, pickle.py uses name %r "
1793 "name %r and code %r, but we don't" %
1797 for code, d in copy.items():
1798 msg.append(" name %r with code %r" % (d.name, code))
1843 code = pickle.read(1)
1844 opcode = code2op.get(code)
1846 if code == "":
1851 code))
1857 if code == '.':
1941 line = "%-4s %s%s" % (repr(opcode.code)[1:-1],
1969 # Stop later code from popping too much.