Author nikratio
Recipients Arfrever, elixir, inada.naoki, ishimoto, jwilk, loewis, mrabarnett, ncoghlan, nikratio, pitrou, rurpy2, serhiy.storchaka, vstinner
Date 2014-01-27.02:09:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390788550.72.0.133062417677.issue15216@psf.upfronthosting.co.za>
In-reply-to
Content
Question:

What is the point of the

        old_encoding = codecs.lookup(self._encoding).name
        encoding = codecs.lookup(encoding).name
        if encoding == old_encoding and errors == self._errors:
            # no change
            return

dance? Isn't this equivalent to

        if encoding == self.encoding and errors == self._errors:
            # no change
            return

except that it doesn't validate the given encoding? But if the encoding is invalid, isn't it enough that the exception is raised a few lines further down?
History
Date User Action Args
2014-01-27 02:09:10nikratiosetrecipients: + nikratio, loewis, ishimoto, ncoghlan, pitrou, vstinner, jwilk, mrabarnett, Arfrever, inada.naoki, rurpy2, serhiy.storchaka, elixir
2014-01-27 02:09:10nikratiosetmessageid: <1390788550.72.0.133062417677.issue15216@psf.upfronthosting.co.za>
2014-01-27 02:09:10nikratiolinkissue15216 messages
2014-01-27 02:09:10nikratiocreate