Armin Rigo <ar...@users.sourceforge.net> added the comment:

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?

----------
nosy: +arigo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13410>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to