But the way you did your example indicates that:
bytes((42, 43, 44, 45, 46))would be an even better __repr__, if the goal is to make it clear and easy that it is a "container of integers from 0 to 255"I've been programming since quite some time ago, and hex has NEVER come naturally to me :-)
I'd rather give bytes a
hexdump() method that returns a string:
'2a 2b 2d 2e 2f'
(possibly with optional arguments to specify the formatting).
While it may shock you, using bytes for "text" makes sense in some
areas. Please read the Motivation of the PEP 461:
https://www.python.org/dev/peps/pep-0461/#motivation