[issue27351] Unexpected ConfigParser.read() behavior when passed fileobject
Rich Rauenzahn
report at bugs.python.org
Mon Jun 20 13:36:59 EDT 2016
Rich Rauenzahn added the comment:
Thank you, lukasz. That's the answer I anticipated -- I can appreciate the backwards compatibility aspect very much.
Regarding the docs, the docs say:
"Attempt to read and parse a list of filenames, returning a list of filenames which were successfully parsed."
I don't know if the convention in the docs is that list always means *list*, but it could be changed to be iterable since that is the implementation.
That fileobjects are also iterables could be pointed out here, but I think anyone making this mistake isn't going to make the mistake from misreading the docs, it's from skipping the docs and assuming read() is consistent with write().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27351>
_______________________________________
More information about the Python-bugs-list
mailing list