29 Jan
2009
29 Jan
'09
4:23 p.m.
On Thu, Jan 29, 2009 at 08:06:18AM -0800, Aahz wrote:
On Thu, Jan 29, 2009, Michael Foord wrote:
Don't we have a pretty-print API - and isn't it spelled __str__ ?
In theory, yes. In practice, we wouldn't be having this discussion if that really worked. But it probably would make sense to see how far using __str__ can take us -- AFAICT enumobject.c doesn't define __str__ (although I may be missing something, I don't know Python at the C level very well).
Container objects (tuples/lists/dicts/sets) don't define __str__. Is __pprint__ an attempt to redefine __str__? Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.