diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2014-03-02 12:07:33 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2014-03-02 12:07:33 +0200 |
commit | 2e0df240db0cf677b0821371af7c2dfc021452ab (patch) | |
tree | dceb3a67c05a44221177473b682b979359a736c0 /node_classes.py | |
parent | 8506cd2a4577bd0a2a6cdff412201c628912c8d1 (diff) | |
download | astroid-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.py | 6 |
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 ############################################################## |