[Python-3000] PEP 3101 clarification requests

Guido van Rossum guido at python.org
Tue Aug 21 19:06:32 CEST 2007


On 8/20/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Guido van Rossum wrote:
> > But how often will you need this? (You only need the !s part if you
> > don't know that the argument is a string.)
>
> Maybe I'm confused. I thought we had agreed that most
> types would delegate to str if they didn't understand
> the format, so most of the time there wouldn't be any
> need to use "!s". Is that still true?

Yes, by virtue of this being what object.__format__ does (AFAIU).

> If not, I think it will be very inconvenient, as I
> very frequently format things of all sorts of types
> using "%s", and rely on it doing something reasonable.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list