Nick Coghlan writes:
In Python 3, "bytes" is still a hybrid type that can hold:
- arbitrary binary data
- binary data that contains ASCII segments
A pure teaching language wouldn't make that compromise.
Of course it would, because nobody in their right mind would restrict a bytes type to the values 128-255!
Yes, I know what you mean: it wouldn't use the hybrid representation for repr or for literals. My point is that even you are making the mistake of framing the issue as whether a bytes object is "arbitrary binary data" or "binary data that contains [readable] ASCII segments" as something inherent in the type. It's not!
It's all about convenience of representation for particular applications, end of story. A repr that obfuscates the content in the "ASCII segment" set of applications *might* be preferable for teaching applications, but I'm not even sure of that.