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 flub
Recipients docs@python, flub
Date 2010-08-15.12:23:40
SpamBayes Score 0.00015317161
Marked as misclassified No
Message-id <1281875025.64.0.398474348151.issue9608@psf.upfronthosting.co.za>
In-reply-to
Content
The description of how to best use exceptions is slightly confusing and led me to believe there was an issue when using open() as a context manager.  The main issue is that the wording seems to suggest the example above it is the best and not the very last.

Attached is a patch which uses a slightly different wording which IMHO makes it clearer that the with-statement is the preferred method and does not introduce subtle bugs.
History
Date User Action Args
2010-08-15 12:23:46flubsetrecipients: + flub, docs@python
2010-08-15 12:23:45flubsetmessageid: <1281875025.64.0.398474348151.issue9608@psf.upfronthosting.co.za>
2010-08-15 12:23:43flublinkissue9608 messages
2010-08-15 12:23:41flubcreate