This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: RawConfigParser __name__ option handling inconsistent
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: lukasz.langa Nosy List: Adam.Groszer, lukasz.langa
Priority: normal Keywords:

Created on 2014-04-09 08:53 by Adam.Groszer, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg215809 - (view) Author: Adam Groszer (Adam.Groszer) Date: 2014-04-09 08:53
In RawConfigParser the "__name__" option handling is inconsistent:

RawConfigParser.options() and items() works hard to hide it, but has_options() does not
msg215817 - (view) Author: Adam Groszer (Adam.Groszer) Date: 2014-04-09 13:30
e.g.

myconfig.has_options(<existing section>, "__name__")

is always True, whereas

myconfig.options(<existing section>)

never has a "__name__" entry
msg226353 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2014-09-04 08:49
Thanks for your report and sorry it took so long to respond!

You are absolutely right that __name__ was a broken feature, which is why we removed it in Python 3.2. See issue #10489. For Python 2.7 you can use the backport, available on PyPI.
History
Date User Action Args
2022-04-11 14:58:01adminsetgithub: 65385
2014-09-04 08:49:42lukasz.langasetstatus: open -> closed
type: behavior
messages: + msg226353

resolution: fixed
stage: resolved
2014-04-12 06:27:45eric.araujosetassignee: lukasz.langa

nosy: + lukasz.langa
2014-04-09 13:30:26Adam.Groszersetmessages: + msg215817
2014-04-09 08:53:03Adam.Groszercreate