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 pitrou
Recipients ezio.melotti, pitrou, serhiy.storchaka, techtonik
Date 2013-05-04.12:14:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367669680.2570.6.camel@fsol>
In-reply-to <1367669121.42.0.775080731282.issue17868@psf.upfronthosting.co.za>
Content
> > I don't understand how it would be useful in the pprint module if it
> > can't be useful as a general function.
> 
> How can it be used besides pprint/pformat functions?

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?

> Then perhaps a new parameter for pprint/pformat needed (hex=True?). I
> think printing integers in hexadecimal can sometimes be useful too.

Passing type-specific parameters to pprint/pformat sounds like a bad
idea to me. And I don't think you'd want to print *all* integers as hex.

> > This won't work very nicely in smaller display widths. You'll need too
> > many lines to represent a bytes object.
> 
> This is a nature of hexdumps. Every byte requires 4+ characters (or 3+
> if group hexdigits tighter).

Which is why the proposal doesn't fit well with pprint/pformat.
History
Date User Action Args
2013-05-04 12:14:42pitrousetrecipients: + pitrou, techtonik, ezio.melotti, serhiy.storchaka
2013-05-04 12:14:42pitroulinkissue17868 messages
2013-05-04 12:14:42pitroucreate