[boB Stepp <robertvst...@gmail.com>] > My Google-fu must be weak tonight.
Look here: https://en.wikipedia.org/wiki/Printf_format_string > I cannot find any discernible > difference between '%f' % <some floating point number> and '%F' % > <some floating point number>. Is there any or do they duplicate > functionality? If the latter, why are there two ways of doing the > same thing? They differ only in the capitalization of the strings produced for NaNs and infinities (math.nan and math.inf in Python 3). >>> "%f" % math.nan nan' >>> "%F" % math.nan NAN' >>> "%f" % math.inf inf' >>> "%F" % math.inf INF' > I had a similar question for %d and %i, but googling suggests these > are inherited from differences in handling input in the C language, > though I could not locate a Python example where there is a need for > one or the other. Are there any relevant Python examples? No difference for output in Python or in C. Python inherited its format codes from C, and so that's why Python allows both: just because C does. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor