This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients doerwalter, ezio.melotti, lemburg, ncoghlan, serhiy.storchaka, vstinner
Date 2013-11-22.11:28:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 22.11.2013 12:24, Marc-Andre Lemburg wrote:
> Nick: I've had a look at your second patch. A couple of notes:
>  * I think you should add the flag to the constructor of the CodecInfo
>    tuple subclass and then set this in the resp. codecs. The extra
>    constructor class method looks too much like a hack and is
>    not needed.

Like this:

    _is_text_encoding = True # Assume codecs are text encodings by default

    def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
        incrementalencoder=None, incrementaldecoder=None, name=None,
        self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) = name
        self.encode = encode
        self.decode = decode
        self.incrementalencoder = incrementalencoder
        self.incrementaldecoder = incrementaldecoder
        self.streamwriter = streamwriter
        self.streamreader = streamreader
        if _is_text_encoding is not None:
            self._is_text_encoding = _is_text_encoding
        return self
Date User Action Args
2013-11-22 11:28:03lemburgsetrecipients: + lemburg, doerwalter, ncoghlan, vstinner, ezio.melotti, serhiy.storchaka
2013-11-22 11:28:03lemburglinkissue19619 messages
2013-11-22 11:28:03lemburgcreate