Vinay Sajip added the comment:

> you have also to remember to restore sys.stdout

I'm not sure you understand how it works. The value of sys.stdout isn't 
changed, so why does it need to be restored?

> for non-English languages it would be more appropriate to use codecs.open() 
> instead of just open()

codecs.open() for older versions of Python, perhaps, but in newer Pythons (this 
issue is marked for Python 3.5), open is io.open which takes an encoding 
parameter.

basicConfig() is meant for the simplest cases, so you have to draw the line 
somewhere as to what "basic" means. I don't propose to change where the line is 
drawn - and AFAIK this is the first time it's come up, so it looks as if the 
many non-English speaking Python users are managing just fine with 
basicConfig() as it is ... note that this kind of thing is always a judgement 
call.

> The complexity of the code grows and increases a danger of "more code, more 
> bugs".

Maybe that's why I'm choosing not to increase the complexity of my code ;-)

----------

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

Reply via email to