A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-December/040617.html below:

[Python-Dev] pprint and list/tuple/dict subclasses

[Python-Dev] pprint and list/tuple/dict subclasses [Python-Dev] pprint and list/tuple/dict subclassesWalter Dörwald walter at livinglogic.de
Tue Dec 2 18:03:36 EST 2003
Fred L. Drake, Jr. wrote:

> Walter Dörwald writes:
>  > Is this patch on SF? What's the patch id?
> 
>     http://www.python.org/sf/750542

OK, I've updated the patch.

Two other ideas for pprint:

The arguments for the PrettyPrinter constructor could
be exposed in pprint() and pformat():
"""
import pprint
print.pprint(foo, indent=3, width=40)
"""

The indent argument could be a string, which is used for indenting,
so indent=" " would be the same as indent=1, indent="   " would
be like indent=3, and we could use something like indent="\t"
or even indent="\033[1;30m...\033[0m".

Bye,
    Walter Dörwald



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4