[issue26606] logging.baseConfig is missing the encoding parameter

Jānis Šlapiņš report at bugs.python.org
Fri Apr 1 04:57:27 EDT 2016


Jānis Šlapiņš added the comment:

Yes, it also works. But then you have also to remember to restore sys.stdout to the initial state at the end. In addition, for non-English languages it would be more appropriate to use codecs.open() instead of just open() in this case.
The complexity of the code grows and increases a danger of "more code, more bugs".

Why to use a "detour" and try always to remember that a part of a module is not useful for you due to particual drawbacks if it is possible to implement a small addition in it that does not break anything?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26606>
_______________________________________


More information about the Python-bugs-list mailing list