[pypy-commit] pypy py3k: Run interpreter/astcompiler/tools/asdl_py.py to regenerate ast.py

amauryfa noreply at buildbot.pypy.org
Fri Sep 7 23:35:23 CEST 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r57238:08791b959abc
Date: 2012-09-07 23:34 +0200
http://bitbucket.org/pypy/pypy/changeset/08791b959abc/

Log:	Run interpreter/astcompiler/tools/asdl_py.py to regenerate ast.py

diff --git a/pypy/interpreter/astcompiler/ast.py b/pypy/interpreter/astcompiler/ast.py
--- a/pypy/interpreter/astcompiler/ast.py
+++ b/pypy/interpreter/astcompiler/ast.py
@@ -999,7 +999,7 @@
         if w_list is not None:
             list_w = space.listview(w_list)
             if list_w:
-                self.names = [space.str_w(w_obj) for w_obj in list_w]
+                self.names = [space.realstr_w(w_obj) for w_obj in list_w]
             else:
                 self.names = None
 
@@ -3188,6 +3188,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'returns', w_new_value)
+        w_self.initialization_state &= ~64
         return
     w_self.deldictvalue(space, 'returns')
     w_self.initialization_state |= 64
@@ -3297,6 +3298,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'starargs', w_new_value)
+        w_self.initialization_state &= ~32
         return
     w_self.deldictvalue(space, 'starargs')
     w_self.initialization_state |= 32
@@ -3320,6 +3322,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'kwargs', w_new_value)
+        w_self.initialization_state &= ~64
         return
     w_self.deldictvalue(space, 'kwargs')
     w_self.initialization_state |= 64
@@ -5855,11 +5858,12 @@
 
 def Bytes_set_s(space, w_self, w_new_value):
     try:
-        w_self.s = w_new_value
+        w_self.s = check_string(space, w_new_value)
     except OperationError, e:
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 's', w_new_value)
+        w_self.initialization_state &= ~4
         return
     w_self.deldictvalue(space, 's')
     w_self.initialization_state |= 4
@@ -6118,6 +6122,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'value', w_new_value)
+        w_self.initialization_state &= ~4
         return
     w_self.deldictvalue(space, 'value')
     w_self.initialization_state |= 4
@@ -6140,6 +6145,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'ctx', w_new_value)
+        w_self.initialization_state &= ~8
         return
     # need to save the original object too
     w_self.setdictvalue(space, 'ctx', w_new_value)
@@ -7073,7 +7079,7 @@
         if space.is_w(w_new_value, space.w_None):
             w_self.name = None
         else:
-            w_self.name = space.str_w(w_new_value)
+            w_self.name = space.realstr_w(w_new_value)
     except OperationError, e:
         if not e.match(space, space.w_TypeError):
             raise
@@ -7188,6 +7194,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'varargannotation', w_new_value)
+        w_self.initialization_state &= ~4
         return
     w_self.deldictvalue(space, 'varargannotation')
     w_self.initialization_state |= 4
@@ -7229,7 +7236,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'kwarg', w_new_value)
-        w_self.initialization_state &= ~4
+        w_self.initialization_state &= ~16
         return
     w_self.deldictvalue(space, 'kwarg')
     w_self.initialization_state |= 16
@@ -7253,6 +7260,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'kwargannotation', w_new_value)
+        w_self.initialization_state &= ~32
         return
     w_self.deldictvalue(space, 'kwargannotation')
     w_self.initialization_state |= 32
@@ -7338,11 +7346,12 @@
 
 def arg_set_arg(space, w_self, w_new_value):
     try:
-        w_self.arg = space.str_w(w_new_value)
+        w_self.arg = space.realstr_w(w_new_value)
     except OperationError, e:
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'arg', w_new_value)
+        w_self.initialization_state &= ~1
         return
     w_self.deldictvalue(space, 'arg')
     w_self.initialization_state |= 1
@@ -7366,6 +7375,7 @@
         if not e.match(space, space.w_TypeError):
             raise
         w_self.setdictvalue(space, 'annotation', w_new_value)
+        w_self.initialization_state &= ~2
         return
     w_self.deldictvalue(space, 'annotation')
     w_self.initialization_state |= 2


More information about the pypy-commit mailing list