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

marco.buttu at gmail.com marco.buttu at gmail.com
Mon Dec 5 11:30:41 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
On 2016/12/05 13:29:56, berkerpeksag wrote:
> On 2016/12/05 13:20:11, marco.buttu wrote:
> > On 2016/12/05 12:27:28, berkerpeksag wrote:
> > > Can this be removed now? (since we've already import it in
testsetup?)
> > 
> > I think it is really important to keep it at the beginning, because
the code
> we
> > show to the reader has to be working code. The user has to import
configparser
> > in the shell before executing manually the example. The import in
the
> testsetup
> > has just the purpose to avoid the same import in all the examples,
when they
> > belong to the same session.
> 
> Yes, that's a good point. I didn't notice it was the first example of
the
> documentation.

In any case, the testsetup is not required (we can remove it), because
all the doctests are executed in the same session, and configparser is
imported from the beginning. So, in a final patch, I will remove it

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


More information about the docs mailing list