[docs] configparser example typo

Fred Drake fred at fdrake.net
Tue Jul 10 11:47:11 EDT 2018


On Tue, Jul 10, 2018 at 10:24 AM Weihe Chen <wec3217 at gmail.com> wrote:
> In the page https://docs.python.org/3/library/configparser.html, under 14.2.1 Quick Start, example 2 with code:
...
>  Shouldn't the last line be configfile.write(config) ?

No; the example is correct.

The config object provides a write method that knows how to format the
configuration data and write it to an open file passed as an argument.


  -Fred

-- 
Fred L. Drake, Jr.    <fred at fdrake.net>
"A storm broke loose in my mind."  --Albert Einstein


More information about the docs mailing list