[issue43458] Tutorial should mention about variable scope in try/except/finally

2021-03-12 Thread Éric Araujo
Éric Araujo added the comment: The only blocks that create scopes are modules, class and functions. if, try, with, for, while, etc are blocks but not new scopes. For the tutorial it could be nice to have an explicit mention and example of this. -- nosy: +eric.araujo

[issue43458] Tutorial should mention about variable scope in try/except/finally

2021-03-09 Thread Marek M
New submission from Marek M : It can be helpful to mention that variables defined in try block are visible in except/finally block as well. I did not find this info in Python tutorial and for me (having C++ background) this is quite unexpected feature. -- assignee: docs@python