[Python-3000] Format specifier proposal
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Aug 16 03:18:12 CEST 2007
Andrew James Wade wrote:
> {1:!renewal date: %Y-%m-%d} # no special meaning for ! here.
Yuck. Although it might happen to work due to reuse of
strftime, I'd consider that bad style -- constant parts
of the output string should be outside of the format
specs, i.e.:
"renewal date: {1:%Y-%m-%d}".format(my_date)
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-3000
mailing list