[Python-Dev] pprint(iterator) (original) (raw)
Steven D'Aprano steve at pearwood.info
Fri Jan 30 12:04:40 CET 2009
- Previous message: [Python-Dev] pprint(iterator)
- Next message: [Python-Dev] pprint(iterator)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Eric Smith wrote:
Terry Reedy wrote:
Ron Adam wrote:
Steven D'Aprano wrote: Michael Foord wrote: Don't we have a pretty-print API - and isn't it spelled str ? Not really. If it were as simple as calling str(obj), there would be no need for the pprint module. I agree. And when I want to use pprint, there are usually additional output formatting requirements I need that isn't a "one size fits all" type of problem. I don't see how you can have a standard interface (like pprint), and have additional, per-object formatting parameters.
I don't see how you can't. Other standard methods take variable arguments: init, new, call come to mind.
But that's beside the point, I don't like pprint in any event. Too special.
I'm not sure what you mean by "too special". It's no more special than any other special method. Do you mean the use-case is not common enough? I would find this useful. Whether enough people would find it useful enough to add yet another special method is an open question.
-- Steven
- Previous message: [Python-Dev] pprint(iterator)
- Next message: [Python-Dev] pprint(iterator)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]