[Python-Dev] transitioning from % to {} formatting

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 3 03:29:06 CEST 2009

Has anyone considered the idea of having the string % operator
behave intelligently according to the contents of the format

If it contains one or more valid %-formats, use old-style
formatting; if it contains one or more valid {}-formats,
use new-style formatting.

Ambiguous cases could arise, of course, but hopefully they
will be fairly rare, and raising an exception would point
out the problem and allow it to be fixed.


More information about the Python-Dev mailing list