➜

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.

作者 nikratio
收信人 Arfrever, elixir, ishimoto, jwilk, loewis, methane, mrabarnett, ncoghlan, nikratio, pitrou, rurpy2, serhiy.storchaka, vstinner
日期 2014-01-27.02:09:10
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1390788550.72.0.133062417677.issue15216@psf.upfronthosting.co.za>
In-reply-to
内容
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?
历史
日期 用户 动作 参数
2014-01-27 02:09:10nikratio修改recipients: + nikratio, loewis, ishimoto, ncoghlan, pitrou, vstinner, jwilk, mrabarnett, Arfrever, methane, rurpy2, serhiy.storchaka, elixir
2014-01-27 02:09:10nikratio修改messageid: <1390788550.72.0.133062417677.issue15216@psf.upfronthosting.co.za>
2014-01-27 02:09:10nikratio链接issue15216 messages
2014-01-27 02:09:10nikratio创建