Author: Antonio Cuni <anto.c...@gmail.com>
Branch: py3k
Changeset: r52426:9e5364a377d1
Date: 2012-02-13 16:56 +0100
http://bitbucket.org/pypy/pypy/changeset/9e5364a377d1/

Log:    make sure that .dump() works again

diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py
--- a/pypy/interpreter/pycode.py
+++ b/pypy/interpreter/pycode.py
@@ -262,8 +262,9 @@
             else:
                 consts[num] = self.space.unwrap(w)
             num += 1
+        assert self.co_kwonlyargcount == 0, 'kwonlyargcount is py3k only, 
cannot turn this code object into a Python2 one'
         return new.code( self.co_argcount,
-                         self.co_kwonlyargcount,
+                         #self.co_kwonlyargcount, # this does not exists in 
python2
                          self.co_nlocals,
                          self.co_stacksize,
                          self.co_flags,
@@ -276,7 +277,7 @@
                          self.co_firstlineno,
                          self.co_lnotab,
                          tuple(self.co_freevars),
-                         tuple(self.co_cellvars) )
+                         tuple(self.co_cellvars))
 
     def exec_host_bytecode(self, w_globals, w_locals):
         from pypy.interpreter.pyframe import CPythonFrame
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to