[Python-Dev] PEP 572 and assert

Serhiy Storchaka storchaka at gmail.com
Tue Jul 17 11:28:09 EDT 2018


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?



More information about the Python-Dev mailing list