[pypy-commit] pypy set-strategies: replaced w_left.strategy with self where possible
l.diekmann
noreply at buildbot.pypy.org
Thu Nov 10 13:51:34 CET 2011
Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r49219:d8bdee84e4e2
Date: 2011-10-11 14:35 +0200
http://bitbucket.org/pypy/pypy/changeset/d8bdee84e4e2/
Log: replaced w_left.strategy with self where possible
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
@@ -270,8 +270,7 @@
def issuperset(self, w_set, w_other):
if (isinstance(w_other, W_BaseSetObject) and
- # XXX can't this be written as w_other.strategy is self?
- w_other.strategy is self.space.fromcache(EmptySetStrategy)):
+ w_other.strategy is self):
return True
elif len(self.space.unpackiterable(w_other)) == 0:
return True
@@ -428,7 +427,7 @@
w_other = w_set._newobj(self.space, w_other)
# XXX shouldn't w_set.strategy be simply "self"?
- if w_set.strategy is w_other.strategy:
+ if self is w_other.strategy:
strategy = w_set.strategy
storage = self._difference_unwrapped(w_set, w_other)
else:
@@ -477,7 +476,7 @@
def _symmetric_difference_base(self, w_set, w_other):
# shouldn't that be "if self is w_other.strategy"?
- if w_set.strategy is w_other.strategy:
+ if self is w_other.strategy:
strategy = w_set.strategy
storage = self._symmetric_difference_unwrapped(w_set, w_other)
else:
@@ -496,7 +495,7 @@
def _intersect_base(self, w_set, w_other):
# XXX shouldn't this again be equivalent to self?
- if w_set.strategy is w_other.strategy:
+ if self is w_other.strategy:
strategy = w_set.strategy
storage = strategy._intersect_unwrapped(w_set, w_other)
else:
More information about the pypy-commit
mailing list