[Python-ideas] Make bytes __repr__ and __str__ representation different?
Steven D'Aprano
steve at pearwood.info
Tue Nov 21 17:35:55 EST 2017
On Tue, Nov 21, 2017 at 01:35:41PM -0200, Joao S. O. Bueno wrote:
> On 21 November 2017 at 13:16, Steven D'Aprano <steve at pearwood.info> wrote:
> > I'd rather leave __str__ and __repr__ alone. Changing them will have
> > huge backwards compatibility implications. I'd rather give bytes a
> > hexdump() method that returns a string:
> >
> > '2a 2b 2d 2e 2f'
>
> Do you mean, like bytes.hex?
Guido's Time Machine strikes again!
--
Steve
More information about the Python-ideas
mailing list