New submission from Julien Palard <julien+pyt...@palard.fr>:

According to [1][2] the documentation about return in finally statement is 
missleading in [3].

It currently states:

> If a finally clause includes a return statement, the finally clause’s return 
> statement will execute before, and instead of, the return statement in a try 
> clause.

I would prefer speaking about returned values instead of statements executed, I 
think it would clarify the point.


[1]: 
https://mail.python.org/archives/list/d...@python.org/message/LBMO47JSDPKFKLYR25HAKD7A76D5IHWI/
[2]: 
https://stackoverflow.com/questions/59639733/python-docs-have-misleading-explanation-of-return-in-finally
[3]: https://docs.python.org/3.7/tutorial/errors.html#defining-clean-up-actions

----------
assignee: mdk
components: Documentation
messages: 361269
nosy: mdk
priority: normal
severity: normal
status: open
title: Clarify tutorial on return statement in finally clause.
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9

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

Reply via email to