[Python-ideas] RFC: bytestring as a str representation [was: a new bytestring type?]
Mark Lawrence
breamoreboy at yahoo.co.uk
Wed Jan 8 11:18:12 CET 2014
On 08/01/2014 09:59, Nick Coghlan wrote:
>
> Now that your proposal has been better explained, yes, I agree that
> "asciibytes" and "asciistr" types would be well worth experimenting
> with. I mention both, since it's far from clear if a str subclass or a
> bytes subclass (or neither, although that may require bug fixes in
> CPython) would be more convenient for this use case.
>
Could you subclass both to get the best of both worlds? As in
class asciixyz(str, bytes):
> Cheers,
> Nick.
>
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-ideas
mailing list