[pypy-commit] pypy py3k: kill builtins.cmp

antocuni noreply at buildbot.pypy.org
Wed Feb 29 23:00:10 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53031:59e34c5ce798
Date: 2012-02-29 16:21 +0100
http://bitbucket.org/pypy/pypy/changeset/59e34c5ce798/

Log:	kill builtins.cmp

diff --git a/pypy/module/__builtin__/__init__.py b/pypy/module/__builtin__/__init__.py
--- a/pypy/module/__builtin__/__init__.py
+++ b/pypy/module/__builtin__/__init__.py
@@ -55,7 +55,6 @@
         'repr'          : 'operation.repr',
         'hash'          : 'operation.hash',
         'round'         : 'operation.round',
-        'cmp'           : 'operation.cmp',
         'divmod'        : 'operation.divmod',
         'format'        : 'operation.format',
         'issubclass'    : 'abstractinst.app_issubclass',
diff --git a/pypy/module/__builtin__/operation.py b/pypy/module/__builtin__/operation.py
--- a/pypy/module/__builtin__/operation.py
+++ b/pypy/module/__builtin__/operation.py
@@ -98,10 +98,6 @@
     "Return the identity of an object: id(x) == id(y) if and only if x is y."
     return space.id(w_object)
 
-def cmp(space, w_x, w_y):
-    """return 0 when x == y, -1 when x < y and 1 when x > y """
-    return space.cmp(w_x, w_y)
-
 def divmod(space, w_x, w_y):
     """Return the tuple ((x-x%y)/y, x%y).  Invariant: div*y + mod == x."""
     return space.divmod(w_x, w_y)


More information about the pypy-commit mailing list