[Python-ideas] Make return inside a finally a SyntaxError

ryles rylesny at gmail.com
Sun Jul 19 01:10:46 CEST 2009


On Jul 17, 8:18 pm, MRAB <pyt... at mrabarnett.plus.com> wrote:
>
> Isn't Python for consenting adults, or something like that? :-)

I agree. And the language reference does shed some light on this
behavior:

http://docs.python.org/reference/compound_stmts.html#the-try-statement

If you don't want return used inside finally blocks then tools like
pylint or pychecker can be made to detect this.



More information about the Python-ideas mailing list