Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r74887:2cb2f52b915b
Date: 2014-12-11 11:22 +0000
http://bitbucket.org/pypy/pypy/changeset/2cb2f52b915b/

Log:    Meh again.

diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -17,13 +17,9 @@
         self.w_value = w_value
 
 
-def needs_to_unwrap_cell(space, w_value):
-    return (space.config.objspace.std.withtypeversion and
-            isinstance(w_value, TypeCell))
-
-
 def unwrap_cell(space, w_value):
-    if needs_to_unwrap_cell(space, w_value):
+    if (space.config.objspace.std.withtypeversion and
+            isinstance(w_value, TypeCell)):
         return w_value.w_value
     return w_value
 
@@ -372,7 +368,8 @@
         name = promote_string(name)
         tup_w = w_self._pure_lookup_where_with_method_cache(name, version_tag)
         w_class, w_value = tup_w
-        if needs_to_unwrap_cell(space, w_value):
+        if (space.config.objspace.std.withtypeversion and
+                isinstance(w_value, TypeCell)):
             return w_class, w_value.w_value
         return tup_w   # don't make a new tuple, reuse the old one
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to