[issue9411] configparser doesn't support specifying encoding in read()
Eric Smith
report at bugs.python.org
Thu Jul 29 12:10:21 CEST 2010
Eric Smith <eric at trueblade.com> added the comment:
The feature request seems reasonable to me, too.
I don't recall if sys.getdefaultencoding() can change while a program is running. If so, you might want to change:
def read(self, filenames, encoding=sys.getdefaultencoding()):
to:
def read(self, filenames, encoding=None):
if encoding is None:
encoding=sys.getdefaultencoding()
Also, what if the files have different encodings?
The patch seems to include 2 features: the encoding change and a comment parsing change. You should separate that into two patches.
----------
nosy: +eric.smith
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9411>
_______________________________________
More information about the Python-bugs-list
mailing list