Lines Matching refs:code
32 # - A pickle optimizer: for example, tuple-building code is sometimes more
146 # copyreg.safe_constructors are removed from the unpickling code.
859 implementations don't share the code -- they should). It's
1099 # the code used in a bytestream to represent the opcode; a
1101 'code',
1124 def __init__(self, name, code, arg,
1129 assert isinstance(code, str)
1130 assert len(code) == 1
1131 self.code = code
1158 code='I',
1183 code='J',
1197 code='K',
1209 code='M',
1222 code='L',
1240 code='\x8a',
1251 code='\x8b',
1264 code='S',
1280 code='T',
1297 code='U',
1316 code='B',
1329 code='C',
1342 code='\x8e',
1357 code='\x96',
1372 code='\x97',
1380 code='\x98',
1390 code='N',
1401 code='\x88',
1409 code='\x89',
1419 code='V',
1432 code='\x8c',
1445 code='X',
1458 code='\x8d',
1473 code='F',
1493 code='G',
1511 code=']',
1519 code='a',
1533 code='e',
1547 code='l',
1565 code=')',
1573 code='t',
1589 code='\x85',
1596 This code pops one value off the stack and pushes a tuple of
1604 code='\x86',
1611 This code pops two values off the stack and pushes a tuple of
1619 code='\x87',
1626 This code pops three values off the stack and pushes a tuple of
1636 code='}',
1644 code='d',
1661 code='s',
1675 code='u',
1698 code='\x8f',
1706 code='\x90',
1728 code='\x91',
1746 code='0',
1754 code='2',
1762 code='(',
1775 code='1',
1791 code='g',
1804 code='h',
1816 code='j',
1828 code='p',
1841 code='q',
1853 code='r',
1865 code='\x94',
1880 code='\x82',
1885 doc="""Extension code.
1887 This code and the similar EXT2 and EXT4 allow using a registry
1894 code registry ought to be global, although a range of codes may
1902 code='\x83',
1907 doc="""Extension code.
1913 code='\x84',
1918 doc="""Extension code.
1927 code='c',
1942 code='\x93',
1952 # and comprehensibly -- you really have to read the pickle code to
1956 code='R',
1973 opcode is followed by code to create setstate's argument, and then a
1985 code='b',
2010 code='i',
2042 or the class object does have a __getinitargs__ attribute), the code
2060 code='o',
2092 code='\x81',
2107 code='\x92',
2124 code='\x80',
2136 code='.',
2151 code='\x95',
2165 code='P',
2182 code='Q',
2197 # Verify uniqueness of .name and .code members.
2205 if d.code in code2i:
2206 raise ValueError("repeated code %r at indices %d and %d" %
2207 (d.code, code2i[d.code], i))
2210 code2i[d.code] = i
2221 code2op[d.code] = d
2236 "code" % (name, picklecode)))
2241 print("checking name %r w/ code %r for consistency" % (
2245 raise ValueError("for pickle code %r, pickle.py uses name %r "
2254 "name %r and code %r, but we don't" %
2258 for code, d in copy.items():
2259 msg.append(" name %r with code %r" % (d.name, code))
2279 code = data.read(1)
2280 opcode = code2op.get(code.decode("latin-1"))
2282 if code == b"":
2287 code))
2296 if code == b'.':
2452 line = "%-4s %s%s" % (repr(opcode.code)[1:-1],
2480 # Stop later code from popping too much.