On Sun, Aug 19, 2018 at 9:03 AM, Marko Rauhamaa <[email protected]> wrote:
> Chris Angelico <[email protected]>:
>
>> *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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to