[pypy-commit] pypy py3.5: Fix translation
amauryfa
pypy.commits at gmail.com
Tue Oct 11 02:49:27 EDT 2016
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.5
Changeset: r87703:2ddf9bfa3ece
Date: 2016-10-11 08:19 +0200
http://bitbucket.org/pypy/pypy/changeset/2ddf9bfa3ece/
Log: Fix translation
diff --git a/pypy/module/_weakref/interp__weakref.py b/pypy/module/_weakref/interp__weakref.py
--- a/pypy/module/_weakref/interp__weakref.py
+++ b/pypy/module/_weakref/interp__weakref.py
@@ -188,9 +188,6 @@
state = u"; to '%s'" % (typename,)
return self.getrepr(space, unicode(self.typedef.name), state)
- def descr_callback(self, space):
- return self.w_callable
-
class W_Weakref(W_WeakrefBase):
def __init__(self, space, w_obj, w_callable):
@@ -232,6 +229,9 @@
def descr__ne__(self, space, w_ref2):
return space.not_(space.eq(self, w_ref2))
+ def descr_callback(self, space):
+ return self.w_callable
+
def getlifeline(space, w_obj):
lifeline = w_obj.getweakref()
if lifeline is None:
@@ -260,7 +260,7 @@
__hash__ = interp2app(W_Weakref.descr_hash),
__call__ = interp2app(W_Weakref.descr_call),
__repr__ = interp2app(W_WeakrefBase.descr__repr__),
- __callback__ = GetSetProperty(W_WeakrefBase.descr_callback),
+ __callback__ = GetSetProperty(W_Weakref.descr_callback),
)
More information about the pypy-commit
mailing list