New-style string formatting

Roy Smith roy at panix.com
Wed May 21 08:51:05 EDT 2003


Gerrit Holl <gerrit at nl.linux.org> wrote:
> My question was actually historic; what is the history of printf?
> Does it come from C or is it older?

Printf was around in the earliest days of C (mid-1970's).  The style of 
format specifier (i.e. 6.4f) is modeled after Fortran FORMAT statements, 
which go back to the late 50's.

It's unclear what the "f" stands for.  One possible explanation is that 
it means "formatted", but my guess is that it really means "function", 
to emphasize that it's a function being called, not a built-in language 
statement.




More information about the Python-list mailing list