Author: Lukas Diekmann <[email protected]>
Branch: set-strategies
Changeset: r49218:4854e943f993
Date: 2011-10-11 14:33 +0200
http://bitbucket.org/pypy/pypy/changeset/4854e943f993/
Log: reuse set_difference_update__Set
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
@@ -893,12 +893,7 @@
if len(others_w) == 0:
return w_left.copy()
result = w_left.copy()
- for w_other in others_w:
- if isinstance(w_other, W_BaseSetObject):
- result.difference_update(w_other)
- else:
- w_other_as_set = w_left._newobj(space, w_other)
- result.difference_update(w_other_as_set)
+ set_difference_update__Set(space, result, others_w)
return result
frozenset_difference__Frozenset = set_difference__Set
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit