Creating formatted output using picture strings

Tim Chase python.list at tim.thechases.com
Wed Feb 10 21:39:44 CET 2010


Grant Edwards wrote:
> [regardning "picture" output format specifiers]
>> I was thinking that there was a built-in function for this
>> common(?) use case
> 
> I haven't seen that paradigm since my one-and-only exposure to
> COBOL in a class I took back in 1979.  Is the "picture" thing
> commonly used in other places than COBOL?

I've spotted in the wild as recently as Visual Basic 6.  I don't 
know if remnants made it into Visual Fred (VB.net).  I think 
they're referred to as "format strings", but they're a mystical 
(and poorly documented) suite of characters that seem to have 
accrued features like my bathtub gets mildew.  Most folks just 
copy and paste the format strings from the web.

-tkc






More information about the Python-list mailing list