[pypy-svn] r16014 - pypy/dist/pypy/interpreter/pyparser

adim at codespeak.net adim at codespeak.net
Fri Aug 12 18:53:06 CEST 2005


Author: adim
Date: Fri Aug 12 18:53:04 2005
New Revision: 16014

Modified:
   pypy/dist/pypy/interpreter/pyparser/astbuilder.py
Log:
removed unneeded asserts

Modified: pypy/dist/pypy/interpreter/pyparser/astbuilder.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/astbuilder.py	(original)
+++ pypy/dist/pypy/interpreter/pyparser/astbuilder.py	Fri Aug 12 18:53:04 2005
@@ -46,7 +46,6 @@
     first = tokens[0]
     assert isinstance(first, TokenObject)
     name = first.get_value()
-    assert isinstance(name, str)
     l = len(tokens)
     index = 1
     for index in range(1, l, 2):
@@ -190,8 +189,8 @@
     assert len(stack) == 1, "At the end of parse_fpdef, len(stack) should be 1, got %s" % stack
     return tokens_read, tuple(stack[0])
 
-# parse_fpdef = rpython_parse_fpdef
-parse_fpdef = working_parse_fpdef
+parse_fpdef = rpython_parse_fpdef
+# parse_fpdef = working_parse_fpdef
 
 def parse_arglist(tokens):
     """returns names, defaults, flags"""
@@ -433,7 +432,6 @@
     stringobject.c (PyString_DecodeEscape()) for complete implementation)
     """
     # return eval(value)
-    assert isinstance(value, str)
     if len(value) == 2:
         return ''
     result = ''
@@ -1434,7 +1432,7 @@
             value = ''
         else:
             value = self.value
-        assert isinstance(value, str)
+        # assert isinstance(value, str)
         return value
     
     def __str__(self):



More information about the Pypy-commit mailing list