[Python-Dev] transitioning from % to {} formatting (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 3 03:29:06 CEST 2009
- Previous message: [Python-Dev] transitioning from % to {} formatting
- Next message: [Python-Dev] transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Has anyone considered the idea of having the string % operator behave intelligently according to the contents of the format string?
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.
-- Greg
- Previous message: [Python-Dev] transitioning from % to {} formatting
- Next message: [Python-Dev] transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]