[pypy-svn] r17352 - in pypy/dist/pypy/interpreter: astcompiler pyparser
ac at codespeak.net
ac at codespeak.net
Thu Sep 8 11:20:02 CEST 2005
Author: ac
Date: Thu Sep 8 11:20:01 2005
New Revision: 17352
Modified:
pypy/dist/pypy/interpreter/astcompiler/pyassem.py
pypy/dist/pypy/interpreter/pyparser/astbuilder.py
Log:
Fix some more SomeObject().
Modified: pypy/dist/pypy/interpreter/astcompiler/pyassem.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pyassem.py (original)
+++ pypy/dist/pypy/interpreter/astcompiler/pyassem.py Thu Sep 8 11:20:01 2005
@@ -935,6 +935,8 @@
return -1
elif argc == 3:
return -2
+ assert False, 'Unexpected argument %s to depth_BUILD_SLICE' % argc
+
def depth_DUP_TOPX(argc):
return argc
Modified: pypy/dist/pypy/interpreter/pyparser/astbuilder.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/astbuilder.py (original)
+++ pypy/dist/pypy/interpreter/pyparser/astbuilder.py Thu Sep 8 11:20:01 2005
@@ -285,6 +285,7 @@
expr = first_child.expr
if builder.is_string_const(expr):
# This *is* a docstring, remove it from stmt list
+ assert isinstance(expr, ast.Const)
del stmt.nodes[0]
doc = expr.value
return doc
@@ -1569,8 +1570,7 @@
value = value[:-1]
return string_to_w_long( space, value, base=base )
try:
- value = string_to_int(value, base=base)
- return space.wrap(value)
+ return space.wrap(string_to_int(value, base=base))
except ParseStringError:
return space.wrap(interp_string_to_float(space,value))
More information about the Pypy-commit
mailing list