[pypy-commit] pypy py3k: Fix translation

amauryfa noreply at buildbot.pypy.org
Sun Nov 6 20:59:17 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48841:bab586dbcd9c
Date: 2011-10-26 16:51 +0200
http://bitbucket.org/pypy/pypy/changeset/bab586dbcd9c/

Log:	Fix translation

diff --git a/pypy/objspace/std/bytearraytype.py b/pypy/objspace/std/bytearraytype.py
--- a/pypy/objspace/std/bytearraytype.py
+++ b/pypy/objspace/std/bytearraytype.py
@@ -63,10 +63,12 @@
     return new_bytearray(space,w_bytearraytype, [])
 
 @gateway.unwrap_spec(encoding='str_or_None', errors='str_or_None')
-def descr__init__(space, w_bytearray, w_source=gateway.NoneNotWrapped,
+def descr__init__(space, w_self, w_source=gateway.NoneNotWrapped,
                   encoding=None, errors=None):
+    from pypy.objspace.std.bytearrayobject import W_BytearrayObject
+    assert isinstance(w_self, W_BytearrayObject)
     data = makebytesdata_w(space, w_source, encoding, errors)
-    w_bytearray.data = data
+    w_self.data = data
 
 
 def descr_bytearray__reduce__(space, w_self):


More information about the pypy-commit mailing list