[Python-checkins] python/nondist/sandbox/pickletools pickletools.py,1.12,1.13

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Sat, 25 Jan 2003 21:41:30 -0800


Update of /cvsroot/python/python/nondist/sandbox/pickletools
In directory sc8-pr-cvs1:/tmp/cvs-serv23944

Modified Files:
	pickletools.py 
Log Message:
Added the empty-container opcodes.


Index: pickletools.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/pickletools/pickletools.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pickletools.py	26 Jan 2003 05:36:37 -0000	1.12
--- pickletools.py	26 Jan 2003 05:41:28 -0000	1.13
***************
*** 535,538 ****
--- 535,553 ----
               doc="The Python None object.")
  
+ pytuple = StackObject(
+               name="tuple",
+               obtype=tuple,
+               doc="A Python tuple object.")
+ 
+ pylist = StackObject(
+              name="list",
+              obtype=list,
+              doc="A Python list object.")
+ 
+ pydict = StackObject(
+              name="dict",
+              obtype=dict,
+              doc="A Python dict object.")
+ 
  anyobject = StackObject(
                  name='any',
***************
*** 918,921 ****
--- 933,962 ----
        """),
  
+     # Empty containers.
+ 
+     I(name='EMPTY_LIST',
+       code=']',
+       args=[],
+       stack_before=[],
+       stack_after=[pylist],
+       proto=0,
+       doc="Push an empty list."),
+ 
+     I(name='EMPTY_TUPLE',
+       code=')',
+       args=[],
+       stack_before=[],
+       stack_after=[pytuple],
+       proto=0,
+       doc="Push an empty tuple."),
+ 
+     I(name='EMPTY_DICT',
+       code='}',
+       args=[],
+       stack_before=[],
+       stack_after=[pydict],
+       proto=0,
+       doc="Push an empty dict."),
+ 
      # Machine control.
  
***************
*** 1034,1048 ****
        """),
  
-     I(name='EMPTY_DICT',
-       code='}',
-       args=[],
-       stack_before=[],
-       stack_after=[],
-       proto=0,
-       doc="""XXX One-line description goes here.
- 
-       XXX Doc body goes here.
-       """),
- 
      I(name='APPENDS',
        code='e',
--- 1075,1078 ----
***************
*** 1078,1092 ****
        """),
  
-     I(name='EMPTY_LIST',
-       code=']',
-       args=[],
-       stack_before=[],
-       stack_after=[],
-       proto=0,
-       doc="""XXX One-line description goes here.
- 
-       XXX Doc body goes here.
-       """),
- 
      I(name='OBJ',
        code='o',
--- 1108,1111 ----
***************
*** 1113,1127 ****
      I(name='TUPLE',
        code='t',
-       args=[],
-       stack_before=[],
-       stack_after=[],
-       proto=0,
-       doc="""XXX One-line description goes here.
- 
-       XXX Doc body goes here.
-       """),
- 
-     I(name='EMPTY_TUPLE',
-       code=')',
        args=[],
        stack_before=[],
--- 1132,1135 ----