[pypy-commit] pypy default: reverted 2.7 {k for k ...} set syntax to an explicit for loop + set init. (s390x machine only has cpython 2.6 installed)
plan_rich
noreply at buildbot.pypy.org
Mon Nov 23 02:26:21 EST 2015
Author: Richard Plangger <planrichi at gmail.com>
Branch:
Changeset: r80844:95fa20db8791
Date: 2015-11-23 08:22 +0100
http://bitbucket.org/pypy/pypy/changeset/95fa20db8791/
Log: reverted 2.7 {k for k ...} set syntax to an explicit for loop + set
init. (s390x machine only has cpython 2.6 installed)
diff --git a/rpython/annotator/model.py b/rpython/annotator/model.py
--- a/rpython/annotator/model.py
+++ b/rpython/annotator/model.py
@@ -461,7 +461,10 @@
def intersection(self, other):
assert isinstance(other, SomeExceptCase)
- classdefs = {c for c in self.classdefs if c.issubclass(other.case)}
+ classdefs = set()
+ for c in self.classdefs:
+ if c.issubclass(other.case):
+ classdefs.add(c)
if classdefs:
return SomeException(classdefs)
else:
@@ -469,7 +472,10 @@
def difference(self, other):
assert isinstance(other, SomeExceptCase)
- classdefs = {c for c in self.classdefs if not c.issubclass(other.case)}
+ classdefs = set()
+ for c in self.classdefs:
+ if not c.issubclass(other.case):
+ classdefs.add(c)
if classdefs:
return SomeException(classdefs)
else:
More information about the pypy-commit
mailing list