Visitar URL original
Docs: Properly label ConfigParser attributes by nedbat · Pull Request #9930 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20260614003834/https://github.com/python/cpython/pull/9930
Skip to content
/ cpython Public

Docs: Properly label ConfigParser attributes#9930

Merged
vstinner merged 1 commit into
python:masterfrom
nedbat:nedbat/config-static-docs
Oct 24, 2018
Merged

Docs: Properly label ConfigParser attributes#9930
vstinner merged 1 commit into
python:masterfrom
nedbat:nedbat/config-static-docs

Conversation

@nedbat

@nedbat nedbat commented Oct 17, 2018 •

Copy link
Copy Markdown
Member

Currently, the docs say

configparser.BOOLEAN_STATES

which isn't right, it's not a module attribute, it's a class attribute. This PR changes the docs to say:

ConfigParser.BOOLEAN_STATES

Though, it's really from RawConfigParser, and why isn't it documented with the rest of the class? But at least this corrects this misattribution.

@vstinner

Copy link
Copy Markdown
Member

I confirm that the doc is wrong.

vstinner@apu$ python3
Python 3.6.6 (default, Jul 19 2018, 14:25:17) 
>>> import configparser
>>> configparser.BOOLEAN_STATES
AttributeError: module 'configparser' has no attribute 'BOOLEAN_STATES'
>>> configparser.ConfigParser.BOOLEAN_STATES
{'1': True, 'yes': True, 'true': True, 'on': True, '0': False, 'no': False, 'false': False, 'off': False}

https://docs.python.org/dev/library/configparser.html

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @nedbat for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @nedbat for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-10087 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 24, 2018
(cherry picked from commit 890423f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
@bedevere-bot

Copy link
Copy Markdown

GH-10088 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 24, 2018
(cherry picked from commit 890423f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
miss-islington added a commit that referenced this pull request Oct 24, 2018
(cherry picked from commit 890423f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
miss-islington added a commit that referenced this pull request Oct 24, 2018
(cherry picked from commit 890423f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
@nedbat nedbat deleted the nedbat/config-static-docs branch January 1, 2020 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants