summaryrefslogtreecommitdiff
path: root/protocols.py
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <amunroe@yelp.com>2014-07-02 17:13:48 -0700
committerEevee (Alex Munroe) <amunroe@yelp.com>2014-07-02 17:13:48 -0700
commit58e5e9774ba6a5cb378f2e30eb026489d66922fd (patch)
tree0b98872d959d4c0959d697f54a4cfa88c544a07f /protocols.py
parentbbc107fb2afed934eef85c3682aa4b3a20cbe450 (diff)
downloadastroid-git-58e5e9774ba6a5cb378f2e30eb026489d66922fd.tar.gz
Fix some deep recursion problems.
They used to be avoided by returning generators in a few places rather than re-yielding, but I broke that with the context managers. Oops. So: - context.push now returns a new context, which should just be passed into the child generator instead of the original context. This solves the awkward problem of returning a generator from within a `with` block, where the block will end before the generator is actually evaluated. - The inference cache no longer eagerly evaluates whatever's being cached; instead it wraps the original generator in a new one that only caches the results once it's done.
Diffstat (limited to 'protocols.py')
0 files changed, 0 insertions, 0 deletions