Serhiy Storchaka added the comment:

There are few issues here.

1. Missed "goto error" after setting an exception in TextIOWrapper constructor. 
This leads to raising wrong and less informative exception (and maybe worse in 
Python 3, but this is harder to reproduce).

2. getpreferredencoding() can return None in rare circumferences. But no code 
using it (except TextIOWrapper) expects this. What is better, fail or fallback 
to ASCII?

----------

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

Reply via email to