Author: Philip Jenvey <pjen...@underboss.org> Branch: Changeset: r66302:5492c8355133 Date: 2013-08-22 13:57 -0700 http://bitbucket.org/pypy/pypy/changeset/5492c8355133/
Log: simplify diff --git a/pypy/objspace/std/dictmultiobject.py b/pypy/objspace/std/dictmultiobject.py --- a/pypy/objspace/std/dictmultiobject.py +++ b/pypy/objspace/std/dictmultiobject.py @@ -1276,10 +1276,7 @@ return _all_contained_in(space, self, w_other) return space.w_False - def descr_ne(self, space, w_other): - if not _is_set_like(w_other): - return space.w_NotImplemented - return space.not_(space.eq(self, w_other)) + descr_ne = negate(descr_eq) def descr_lt(self, space, w_other): if not _is_set_like(w_other): diff --git a/pypy/objspace/std/util.py b/pypy/objspace/std/util.py --- a/pypy/objspace/std/util.py +++ b/pypy/objspace/std/util.py @@ -9,10 +9,7 @@ tmp = f(self, space, w_other) if tmp is space.w_NotImplemented: return space.w_NotImplemented - elif tmp is space.w_False: - return space.w_True - else: - return space.w_False + return space.newbool(tmp is space.w_False) _negator.func_name = 'negate-%s' % f.func_name return _negator _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit