Open pylint-bot opened 9 years ago
Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)
We could infer what a list set or a dict comprehension returns when inferred, by using node.ilookup and creating a List / Set or Dict.
This can be useful for detecting bugs as these:
#!python f = [i for i in [1, 2]] print(f[0].lala) # int has no attribute lala [i for i in range(1)][9] # oups index error
etc
Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)
We could infer what a list set or a dict comprehension returns when inferred, by using node.ilookup and creating a List / Set or Dict.
This can be useful for detecting bugs as these:
etc