[Python-Dev] pprint and list/tuple/dict subclasses (original) (raw)
Walter Dörwald walter at livinglogic.de
Tue Dec 2 14:39:15 EST 2003
- Previous message: [Python-Dev] pprint and list/tuple/dict subclasses
- Next message: [Python-Dev] Re: "groupby" iterator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hunter Peress wrote:
I see the arguments,but the following code works fine. so what exactly is the issue?
#!/usr/bin/python import sys,commands,os,re,string from pprint import pprint as ppr class t(list): pass inst = t() inst.append(1) inst.append({2:3}) inst.append([4,5,6,[7,8]]) ppr(inst)
This uses list.repr(), but you won't see any difference because the string is too short.
Bye, Walter Dörwald
- Previous message: [Python-Dev] pprint and list/tuple/dict subclasses
- Next message: [Python-Dev] Re: "groupby" iterator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]