[pypy-commit] pypy default: (antocuni, arigo) simplify the definition of le and gt, to avoid using space.or_
antocuni
noreply at buildbot.pypy.org
Thu Mar 1 17:21:08 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r53065:179988ad9d26
Date: 2012-03-01 17:20 +0100
http://bitbucket.org/pypy/pypy/changeset/179988ad9d26/
Log: (antocuni, arigo) simplify the definition of le and gt, to avoid
using space.or_
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -66,12 +66,11 @@
@interp2app
def auto__le__(space, w_self, w_other):
- return space.or_(space.lt(w_self, w_other),
- space.eq(w_self, w_other))
+ return space.not_(space.gt(w_self, w_other))
@interp2app
def auto__gt__(space, w_self, w_other):
- return space.not_(space.le(w_self, w_other))
+ return space.lt(w_other, w_self)
@interp2app
def auto__ge__(space, w_self, w_other):
More information about the pypy-commit
mailing list