Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r48662:6cb0e75f39f9 Date: 2011-11-02 17:00 +0100 http://bitbucket.org/pypy/pypy/changeset/6cb0e75f39f9/
Log: Clean up: min() is now RPython. diff --git a/pypy/objspace/std/tupleobject.py b/pypy/objspace/std/tupleobject.py --- a/pypy/objspace/std/tupleobject.py +++ b/pypy/objspace/std/tupleobject.py @@ -108,15 +108,10 @@ return space.w_False return space.w_True -def _min(a, b): - if a < b: - return a - return b - def lt__Tuple_Tuple(space, w_tuple1, w_tuple2): items1 = w_tuple1.wrappeditems items2 = w_tuple2.wrappeditems - ncmp = _min(len(items1), len(items2)) + ncmp = min(len(items1), len(items2)) # Search for the first index where items are different for p in range(ncmp): if not space.eq_w(items1[p], items2[p]): @@ -127,7 +122,7 @@ def gt__Tuple_Tuple(space, w_tuple1, w_tuple2): items1 = w_tuple1.wrappeditems items2 = w_tuple2.wrappeditems - ncmp = _min(len(items1), len(items2)) + ncmp = min(len(items1), len(items2)) # Search for the first index where items are different for p in range(ncmp): if not space.eq_w(items1[p], items2[p]): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit