[Python-Dev] Add transform() and untranform() methods
Nick Coghlan
ncoghlan at gmail.com
Sat Nov 16 12:38:47 CET 2013
On 16 November 2013 20:45, Victor Stinner <victor.stinner at gmail.com> wrote:
> Why not using str type for str and str subtypes, and bytes type for bytes
> and bytes-like object (bytearray, memoryview)? I don't think that we need an
> ABC here.
We'd only need an ABC if info was added for supported input types.
However, that's not necessary since "encodes_to" and "decodes_to" are
enough to identify Unicode encodings: "encodes_to in (None, bytes) and
decodes_to in (None, str)", so we don't need to track input type
support at all if the main question we want to answer is "is this a
Unicode codec or not?".
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list