[pypy-commit] pypy stdlib-2.7.4: Remove unnecessary long method on W_root.

chrish42 noreply at buildbot.pypy.org
Wed Aug 14 02:24:04 CEST 2013


Author: Christian Hudon <chrish at pianocktail.org>
Branch: stdlib-2.7.4
Changeset: r66139:e9f522eea11f
Date: 2013-08-13 17:19 -0400
http://bitbucket.org/pypy/pypy/changeset/e9f522eea11f/

Log:	Remove unnecessary long method on W_root.

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -231,18 +231,6 @@
         msg = "__int__ returned non-int (type '%T')"
         raise operationerrfmt(space.w_TypeError, msg, w_result)
 
-    def long(self, space):
-        w_impl = space.lookup(self, '__long__')
-        if w_impl is None:
-            raise operationerrfmt(space.w_TypeError,
-                  "unsupported operand type for long(): '%T'", self)
-        w_result = space.get_and_call_function(w_impl, self)
-
-        if space.isinstance_w(w_result, space.w_long):
-            return w_result
-        msg = "__long__ returned non-long (type '%T')"
-        raise operationerrfmt(space.w_TypeError, msg, w_result)
-
     def __spacebind__(self, space):
         return self
 


More information about the pypy-commit mailing list