osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pylint false positives


On Sun, Aug 19, 2018 at 9:03 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Chris Angelico <rosuav at gmail.com>:
>
>> *headscratch*
>>
>> So this is okay:
>>
>> def f():
>>     for i in range(5):
>>         def g(): ...
>>
>> But this isn't:
>>
>> class C:
>>     for i in range(5):
>>         def m(self): ...
>>
>> I've missed something here.
>
> No, you got it right.
>

Then I've completely missed the problem. Why is one of them acceptable
and the other not?

ChrisA