summaryrefslogtreecommitdiff
path: root/astroid/helpers.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-12-08 10:42:36 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2015-12-08 10:42:36 +0200
commit91747c50f885efe461c0054a7835992f49740ab9 (patch)
treebf730a97ef123b77e55d5f9eb528d9930e61f9d0 /astroid/helpers.py
parent4b4cdeb07b670ef2366c159ef675c336f3c2fb6f (diff)
downloadastroid-91747c50f885efe461c0054a7835992f49740ab9.tar.gz
Some nodes got a new attribute, 'ctx', which tells in which context the said node was used.
The possible values for the contexts are `Load` ('a'), `Del` ('del a'), `Store` ('a = 4') and the nodes that got the new attribute are Starred, Subscript, List and Tuple. The builtin ast module provides contexts for Name and Attribute as well, but we took a different approach in the past, by having different nodes for each type of context. For instance, Name used in a Del context is a DelName, while Name used in a Store context is AssignName. Since this is ingrained in astroid since quite some time, it makes no sense to change them as well, even though it's a loss of consistency. The patch introduces a new dependency to enum34 on older Python versions, which is used for building the three possible enum values for the contexts. Closes issue #267.
Diffstat (limited to 'astroid/helpers.py')
0 files changed, 0 insertions, 0 deletions