pylint-bot / test

0 stars 0 forks source link

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

Open pylint-bot opened 9 years ago

pylint-bot commented 9 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.