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.

Author vinay.sajip
Recipients janis.slapins, vinay.sajip
Date 2016-04-01.16:03:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459526609.06.0.53041135429.issue26606@psf.upfronthosting.co.za>
In-reply-to
Content
> 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 ;-)
History
Date User Action Args
2016-04-01 16:03:29vinay.sajipsetrecipients: + vinay.sajip, janis.slapins
2016-04-01 16:03:29vinay.sajipsetmessageid: <1459526609.06.0.53041135429.issue26606@psf.upfronthosting.co.za>
2016-04-01 16:03:29vinay.sajiplinkissue26606 messages
2016-04-01 16:03:28vinay.sajipcreate