New submission from Yury Selivanov <yseliva...@gmail.com>:

I think that the documentation should put more emphasis on the `return` 
statement in a `finally` block.

Example:

  def test():
      try:
          1/0
      finally:
          return 10

  >>> test()
  10

I think we need to add a warning, or at least a note, that 'return' masks 
exceptions, if any occurred.

----------
assignee: docs@python
components: Documentation
messages: 154697
nosy: Yury.Selivanov, docs@python, georg.brandl, rhettinger
priority: normal
severity: normal
status: open
title: document return statement in finally blocks
type: enhancement
versions: Python 2.7, Python 3.2

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

Reply via email to