Message190754
| 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:50 | brett.cannon | set | recipients:
+ brett.cannon |
| 2013年06月07日 15:31:50 | brett.cannon | set | messageid: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za> |
| 2013年06月07日 15:31:50 | brett.cannon | link | issue18156 messages |
| 2013年06月07日 15:31:49 | brett.cannon | create |
|