Open pylint-bot opened 9 years ago
For the given example, what do you think about having the iter
part of the Comprehension
node ignore the GeneratorExp
scope? That would fix the lookup and the iter
(__(dict(**k))
) part of the comprehension doesn't really have meaningful scope in the comprehension
Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore)
Given the following code, astroid will crash with a RuntimeError. The problem occurs because k is not inferred as the argument, but as the iterating element from the comprehension, which makes dict(**k) to be reevaluated at each inference step. This might be solved when we'll rewrite the lookup mechanism, since right now it's scattered all over the place.