[Python-Dev] str with base
Raymond Hettinger
raymond.hettinger at verizon.net
Tue Jan 17 05:13:27 CET 2006
> I wish you had an argument better than "every bright beginner assumes
> it exists". :-)
>
> But (unlike for some other things that bright beginners might assume)
> I don't think there's a deep reason why this couldn't exist.
>
> The only reasons I can come up with is "because input and output are
> notoriously asymmetric in Python" and "because nobody submitted a
> patch". :-)
My reason is that I've rolled-my-own more times than I can count but
infrequently enough to where it was easier to re-write than to search
for the previous use.
Another quick thought: I presume that only the str() builtin would
change and that the underlying __str__ slot would continue to be
hard-wired to the (reprfunc) signature.
Raymond
More information about the Python-Dev
mailing list