pylint-bot / astroid-unofficial

UNOFFICIAL playground for astroid github migration
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Add a context for certain nodes, similar to the builtin module ast #267

Open pylint-bot opened 8 years ago

pylint-bot commented 8 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: PCManticore)


There are a couple of nodes in the builtin module ast which provide a .ctx member, useful for determining in what context these nodes occurred, with types such as Store, for instance for x[1] = 2, Del for del x[1] and Load for the rest of them. Might be useful for pylint for disambiguating between a __getitem__ call or a __setitem__ call.