Message124968
| Author |
ethan.furman |
| Recipients |
draghuram, eric.araujo, ethan.furman, mrabarnett, ncoghlan, pitrou, poke, rhettinger, steven.daprano |
| Date |
2010年12月31日.15:42:48 |
| SpamBayes Score |
0.0018652364 |
| Marked as misclassified |
No |
| Message-id |
<4D1DFA03.4040700@stoneleaf.us> |
| In-reply-to |
<1293791928.3680.0.camel@localhost.localdomain> |
| Content |
raise AttributeError from None
makes sense to me, and in a nice, short example like that I prefer it.
In real code, however, I think
raise AttributeError.no_context("Field %s is not in table" % attr)
is going to be easier for the human to parse than
raise AttributeError("Field %s is not in table" % attr) from None |
|