[issue13410] String formatting bug in interactive mode
Armin Rigo
report at bugs.python.org
Sun Nov 20 10:13:38 CET 2011
Armin Rigo <arigo at 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 <report at bugs.python.org>
<http://bugs.python.org/issue13410>
_______________________________________
More information about the Python-bugs-list
mailing list