[Python-Dev] PEP 460: allowing %d and %f and mojibake
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Jan 12 23:12:45 CET 2014
Mark Lawrence wrote:
> I entirely agree. This would also parallel the conversion flags given
> here http://docs.python.org/3/library/string.html#format-string-syntax,
> I quote "Three conversion flags are currently supported: '!s' which
> calls str() on the value, '!r' which calls repr() and '!a' which calls
> ascii()".
Except that ascii() does something rather different --
it's a variation on repr() rather than str(), and it
doesn't imply any encoding operation.
I think this parallel would be more confusing than
helpful.
--
Greg
More information about the Python-Dev
mailing list