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 rhettinger
Recipients ellingtonjp, ncoghlan, rhettinger, xiang.zhang
Date 2016-05-24.05:28:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464067728.69.0.334509726499.issue27100@psf.upfronthosting.co.za>
In-reply-to
Content
Nick, I've seen the come-up several times with people learning about context managers.  The current error message seems cause confusion because it checks for __exit__ before __enter__, implying that the __enter__ is optional which it isn't.   Do you have any objections testing for __enter__ first?
History
Date User Action Args
2016-05-24 05:28:48rhettingersetrecipients: + rhettinger, ncoghlan, xiang.zhang, ellingtonjp
2016-05-24 05:28:48rhettingersetmessageid: <1464067728.69.0.334509726499.issue27100@psf.upfronthosting.co.za>
2016-05-24 05:28:48rhettingerlinkissue27100 messages
2016-05-24 05:28:48rhettingercreate