[py3.3] don't crash on 'yield from' nodes. Closes #124360

authorSylvain Th?nault <sylvain.thenault@logilab.fr>
changeset5b19a3c5b985
branchstable
phasepublic
hiddenno
parent revision#6e82e28d4a0d Add support for inference of subscript operations on dict literals. Closes #123074
child revision#d4cf183a28fa don't call const_factory for builtin types subclasses, this will trigger error later. Closes #124337, #650d727f2f1c enhanced generator support. Closes #124340, #ca8af5dab939 enhanced generator support. Closes #124340
files modified by this revision
ChangeLog
rebuilder.py
# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1364397920 -3600
# Wed Mar 27 16:25:20 2013 +0100
# Branch stable
# Node ID 5b19a3c5b9854c82a78d3f066717f4e46890db9c
# Parent 6e82e28d4a0d00ebffa05d78f3cb2f63be91012d
[py3.3] don't crash on 'yield from' nodes. Closes #124360

diff --git a/ChangeLog b/ChangeLog
@@ -1,10 +1,10 @@
1  Change log for the astng package
2  ================================
3 
4  --
5 -
6 +    * #124360 [py3.3]: Don't crash on 'yield from' nodes
7      * #123062 [pylint-brain]: Use correct names for keywords for urlparse
8      * #123056 [pylint-brain]: Add missing methods for hashlib
9      * #123068: Fix inference for generator methods to correctly handle yields
10        in lambdas.
11      * #123068: Make sure .as_string() returns valid code for yields in
diff --git a/rebuilder.py b/rebuilder.py
@@ -877,10 +877,12 @@
12              newnode.handlers = [self.visit(child, newnode) for child in node.handlers]
13              newnode.orelse = [self.visit(child, newnode) for child in node.orelse]
14          newnode.set_line_info(newnode.last_child())
15          return newnode
16 
17 +    def visit_yieldfrom(self, node, parent):
18 +        return self.visit_yield(node, parent)
19 
20  if sys.version_info >= (3, 0):
21      TreeRebuilder = TreeRebuilder3k
22 
23