[Python-Dev] pprint and list/tuple/dict subclasses (original) (raw)
Walter Dörwald walter at livinglogic.de
Tue Dec 2 18:03:36 EST 2003
- Previous message: [Python-Dev] pprint and list/tuple/dict subclasses
- Next message: [Python-Dev] pprint and list/tuple/dict subclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fred L. Drake, Jr. wrote:
Walter Dörwald writes: > Is this patch on SF? What's the patch id?
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
- Previous message: [Python-Dev] pprint and list/tuple/dict subclasses
- Next message: [Python-Dev] pprint and list/tuple/dict subclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]