Author: Lukas Diekmann <lukas.diekm...@uni-duesseldorf.de> Branch: set-strategies Changeset: r49217:5676c0591355 Date: 2011-10-11 14:30 +0200 http://bitbucket.org/pypy/pypy/changeset/5676c0591355/
Log: to be consistent create a set and call difference_update here too diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py --- a/pypy/objspace/std/setobject.py +++ b/pypy/objspace/std/setobject.py @@ -910,9 +910,8 @@ # optimization only w_left.difference_update(w_other) else: - for w_key in space.listview(w_other): - space.hash(w_key) - w_left.remove(w_key) + w_other_as_set = w_left._newobj(space, w_other) + w_left.difference_update(w_other_as_set) def inplace_sub__Set_Set(space, w_left, w_other): w_left.difference_update(w_other) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit