LazyContext.infer() should return a set.

This commit is contained in:
Dave Halter
2017-01-02 12:15:09 +01:00
parent 375fcd9e66
commit 96bb9e3c1a
2 changed files with 5 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ class AbstractLazyContext(object):
class LazyKnownContext(AbstractLazyContext): class LazyKnownContext(AbstractLazyContext):
"""data is a context.""" """data is a context."""
def infer(self): def infer(self):
yield self.data return set([self.data])
class LazyKnownContexts(AbstractLazyContext): class LazyKnownContexts(AbstractLazyContext):

View File

@@ -108,7 +108,7 @@ for c in Counter(3, 8):
# ----------------- # -----------------
# tuples # tuple assignments
# ----------------- # -----------------
def gen(): def gen():
if random.choice([0,1]): if random.choice([0,1]):
@@ -148,6 +148,9 @@ a
#? str() #? str()
b b
a, = (a for a in [1])
#? int()
a
# ----------------- # -----------------
# More complicated access # More complicated access