[docs] Fixed all the doctest failures in Doc/library/configparser.rst (issue 28860)

berker.peksag at gmail.com berker.peksag at gmail.com
Mon Dec 5 06:27:28 EST 2016


http://bugs.python.org/review/28860/diff/19350/Doc/library/configparser.rst
File Doc/library/configparser.rst (left):

http://bugs.python.org/review/28860/diff/19350/Doc/library/configparser.rst#oldcode73
Doc/library/configparser.rst:73: >>> import configparser
Can this be removed now? (since we've already import it in testsetup?)

http://bugs.python.org/review/28860/diff/19350/Doc/library/configparser.rst#oldcode576
Doc/library/configparser.rst:576: >>> from configparser import
ConfigParser, ExtendedInterpolation
Perhaps we can change this example to use configparser.foo format and
remove this line too?

http://bugs.python.org/review/28860/diff/19350/Doc/library/configparser.rst
File Doc/library/configparser.rst (right):

http://bugs.python.org/review/28860/diff/19350/Doc/library/configparser.rst#newcode476
Doc/library/configparser.rst:476: >>> sorted(parser.sections())
I'd skip this one like you did in your first patch.

As a reader, I find using sorted() here less readable and more
confusing.

+1 for using sorted() in the iteration examples (but I'd skip them too
since they may have already tested in Lib/test/test_configparser.py)

http://bugs.python.org/review/28860/


More information about the docs mailing list