Changeset 388 for python/vendor/current/Lib/pickletools.py
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Lib/pickletools.py
r2 r388 805 805 doc="""An object representing a contiguous slice of the stack. 806 806 807 This is used in conju ction with markobject, to represent all807 This is used in conjunction with markobject, to represent all 808 808 of the stack following the topmost markobject. For example, 809 809 the POP_MARK opcode changes the stack from … … 1215 1215 stack_after=[pytuple], 1216 1216 proto=2, 1217 doc=""" One-tuple.1217 doc="""Build a one-tuple out of the topmost item on the stack. 1218 1218 1219 1219 This code pops one value off the stack and pushes a tuple of 1220 length 1 whose one item is that value back onto it. IOW: 1220 length 1 whose one item is that value back onto it. In other 1221 words: 1221 1222 1222 1223 stack[-1] = tuple(stack[-1:]) … … 1229 1230 stack_after=[pytuple], 1230 1231 proto=2, 1231 doc="""One-tuple. 1232 1233 This code pops two values off the stack and pushes a tuple 1234 of length 2 whose items are those values back onto it. IOW: 1232 doc="""Build a two-tuple out of the top two items on the stack. 1233 1234 This code pops two values off the stack and pushes a tuple of 1235 length 2 whose items are those values back onto it. In other 1236 words: 1235 1237 1236 1238 stack[-2:] = [tuple(stack[-2:])] … … 1243 1245 stack_after=[pytuple], 1244 1246 proto=2, 1245 doc="""One-tuple. 1246 1247 This code pops three values off the stack and pushes a tuple 1248 of length 3 whose items are those values back onto it. IOW: 1247 doc="""Build a three-tuple out of the top three items on the stack. 1248 1249 This code pops three values off the stack and pushes a tuple of 1250 length 3 whose items are those values back onto it. In other 1251 words: 1249 1252 1250 1253 stack[-3:] = [tuple(stack[-3:])] … … 1368 1371 doc="""Read an object from the memo and push it on the stack. 1369 1372 1370 The index of the memo object to push is given by the newline-ter iminated1373 The index of the memo object to push is given by the newline-terminated 1371 1374 decimal string following. BINGET and LONG_BINGET are space-optimized 1372 1375 versions. … … 1927 1930 stack = [] # crude emulation of unpickler stack 1928 1931 if memo is None: 1929 memo = {} # crude emulation of unpick er memo1932 memo = {} # crude emulation of unpickler memo 1930 1933 maxproto = -1 # max protocol number seen 1931 1934 markstack = [] # bytecode positions of MARK opcodes
Note:
See TracChangeset
for help on using the changeset viewer.