[newbie]Is there a module for print object in a readable format?
kent37 at tds.net
Wed Oct 19 17:43:20 CEST 2005
Micah Elliott wrote:
> On Oct 20, Steven D'Aprano wrote:
>>That's not what I get. What are you using?
>>py> pprint.pprint([1,2,3,4,[0,1,2], 5], width=1, indent=4)
>>Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>>TypeError: pprint() got an unexpected keyword argument 'width'
> I find it useful to have all relevant python versions (as listed on
> http://www.python.org/download/) installed on my primary test
If you want to know when a feature was introduced, the docs are often helpful:
pprint( object[, stream[, indent[, width[, depth]]]])
Changed in version 2.4: The parameters indent, width and depth were added.
More information about the Python-list