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

[Python-Dev] PEP 572 and assert

17.07.18 17:59, Guido van Rossum ????:
> The PEP has no specific opinion except it is not forbidden.
> Personally I like Barry's example just fine -- assuming `subdirs` is not 
> used later, this feels like a good use case.

Shouldn't this problem be solved in the same way as for comprehensions?
Should not the assert statement introduce an implicit lexical scope for 
preventing leaking variables?