Serhiy Storchaka added the comment:

My bad. I had cleaned patch before committing to 3.x, but forgot to revert and 
correct it in 2.7. Thank you Vajrasky an Zachary.

> Does it mean: "UTF-7 is an unlikely locale encoding"?

Sorry for my bad English. I meant that UTF-7 is used here because it is 
unlikely that it is locale encoding. Is "an" needed here?

> I would actually vote for using writeTmp, and make a new issue for making 
> writeTmp use a context manager.

I think that explicit two-line code is better than calling superfluous 
function. We don't need generated filename, we write only one chunk of code, we 
use context manager, so the code is only two lines long.

> inside a `try ... except UnicodeDecodeError: self.fail('Read to end of 
> file')` block.

May be, but in 2.7 a traceback doesn't contain info about original exception 
and this can hide necessary details in case of failure.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20501>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to