homepage

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 brett.cannon
Recipients brett.cannon
Date 2013年06月07日.15:31:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za>
In-reply-to
Content
Much like ImportError now has 'name' and 'path', AttributeError should get an 'attr' attribute that can only be set through a keyword argument or after creating an instance. That would make the common ``try/except AttributeError`` uses much more robust by not accidentally swallowing an AttributeError that has nothing to do with the attribute in question::
 try:
 cls.meth()
 except AttributeError as exc:
 if exc.attr != 'meth':
 raise
History
Date User Action Args
2013年06月07日 15:31:50brett.cannonsetrecipients: + brett.cannon
2013年06月07日 15:31:50brett.cannonsetmessageid: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za>
2013年06月07日 15:31:50brett.cannonlinkissue18156 messages
2013年06月07日 15:31:49brett.cannoncreate

AltStyle によって変換されたページ (->オリジナル) /