This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ezio.melotti, pitrou, serhiy.storchaka, techtonik
Date 2013-05-04.15:41:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367682090.3.0.887583855769.issue17868@psf.upfronthosting.co.za>
In-reply-to
Content
> I don't understand your question. Do you never print some data at the
> command-line prompt? Or even as part of small test programs?

To be honest, I very rarely even use pprint. I'm too lazy to import it. If I want to quickly get a hexdump, I use something like `' '.join('%02X'%i for i in data)`. It is shorter than `import pprint; pprint.hexdump(data)`. For a small program most likely the standard hexdump() will not be enough.

> Passing type-specific parameters to pprint/pformat sounds like a bad
> idea to me.

Agree. Of course it would be better to automatically determine a "nice" display (use hexdump only for large non-printable bytes).

> And I don't think you'd want to print *all* integers as hex.

If you want to print bytes in hex, why not ints and floats? ;)  In fact I don't want to print data as hex, so shut up.

> Which is why the proposal doesn't fit well with pprint/pformat.

Perhaps I misunderstood your wish. I'm not against consider pprint as a black box, which does all good magic inside by default. The use of this feature does not require anything from the users and does not impose obligations on the maintainers. But I'm not interested in a separate function.
History
Date User Action Args
2013-05-04 15:41:30serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, techtonik, ezio.melotti
2013-05-04 15:41:30serhiy.storchakasetmessageid: <1367682090.3.0.887583855769.issue17868@psf.upfronthosting.co.za>
2013-05-04 15:41:30serhiy.storchakalinkissue17868 messages
2013-05-04 15:41:30serhiy.storchakacreate