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/ p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com