python / python/cpython

Note that `configparser.ConfigParser.items` returns a `collections.abc.ItemsView` in the first overload

Open
#149,050 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Documentation

When the items method of an instance of configparser.ConfigParser is called without a section argument, the implementation delegates to the items method of the superclass directly to return a typical view of dictionary items; that is, a special set-like iterator over tuples of the form (section_name, section_proxy). This is as opposed to the documented behaviour, which states a list is returned for both overloads (regardless if section is passed).

Linked PRs
  • gh-150059

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ConfigParser.items documentation entry and compare the documented return types for calls with and without a section argument against the implementation behavior described here. Done means the first overload documents its ItemsView result accurately while the second overload remains correctly described.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.