Message147977
| Author |
arigo |
| Recipients |
amaury.forgeotdarc, arigo, eric.smith, ezio.melotti, flox, jayanth, mark.dickinson, ronaldoussoren |
| Date |
2011年11月20日.09:13:37 |
| SpamBayes Score |
2.968173e-05 |
| Marked as misclassified |
No |
| Message-id |
<1321780418.35.0.778470277686.issue13410@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Fwiw, a class with methods __long__ and __float__ but no method __int__ behaves strangely in many other places; the canonical example is that calling "int(Foo(42))" will not work. In light of this, does it make sense for "'%d' % Foo(42)" to work? Shouldn't the fix instead be to cleanly raise the TypeError instead? |
|