summaryrefslogtreecommitdiff
path: root/node_classes.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-03-02 12:07:33 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2014-03-02 12:07:33 +0200
commit2e0df240db0cf677b0821371af7c2dfc021452ab (patch)
treedceb3a67c05a44221177473b682b979359a736c0 /node_classes.py
parent8506cd2a4577bd0a2a6cdff412201c628912c8d1 (diff)
downloadastroid-git-2e0df240db0cf677b0821371af7c2dfc021452ab.tar.gz
Add yield_from property for Yield nodes.
--HG-- branch : yield_from
Diffstat (limited to 'node_classes.py')
-rw-r--r--node_classes.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/node_classes.py b/node_classes.py
index 97bd9079..3873127e 100644
--- a/node_classes.py
+++ b/node_classes.py
@@ -886,7 +886,11 @@ class With(BlockRangeMixIn, AssignTypeMixin, Statement):
class Yield(NodeNG):
"""class representing a Yield node"""
_astroid_fields = ('value',)
- value = None
+ value = _from = None
+
+ @property
+ def yield_from(self):
+ return self._from
# constants ##############################################################