Oleksandr Suvorov <susl...@gmail.com> added the comment:

Mark, 
I'm not sure if this is even documented, 
I find this a bit inconsistent when compared to the behavior of other 
statements, 
E.g.: 
* list expressions do have their scope and do not overwrite local variables
* with statement does overwrite the variable value but makes it available even 
after with block 
* except overwrites variable value, but then the value gets cleaned and no 
longer accessible. 

I do understand why this happens, but I find this undesirable. At least some 
consistency will be nice to have, or this should be documented. Otherwise, it 
confuses.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40728>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to