Nikolaus Rath added the comment:
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?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15216>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com