This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Yury.Selivanov
Recipients Yury.Selivanov, docs@python, georg.brandl, rhettinger
Date 2012-03-01.15:07:08
SpamBayes Score 1.0435083e-06
Marked as misclassified No
Message-id <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-01 15:07:09Yury.Selivanovsetrecipients: + Yury.Selivanov, georg.brandl, rhettinger, docs@python
2012-03-01 15:07:09Yury.Selivanovsetmessageid: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za>
2012-03-01 15:07:08Yury.Selivanovlinkissue14167 messages
2012-03-01 15:07:08Yury.Selivanovcreate