python / python/cpython

Circular dependency between `mapping` term `collections.abc.Mapping`

Open
#149,093 6 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

The mapping (1) glossary term is defined as

A container object that supports arbitrary key lookups and implements the methods specified in the collections.abc.Mapping or collections.abc.MutableMapping abstract base classes. Examples include dict, collections.defaultdict, and collections.Counter.

Whereas for example collections.abc.Mapping(2) and collections.abc.MutableMapping(2) have the documentation:

ABCs for read-only and mutable mappings.

I expected either the documentation on a mapping or the documentation on the ABC's to describe or link to what methods a (mutable) mapping implements. Now they refer to each other in a circle for the actual specification of what methods are required.

1: https://docs.python.org/3/glossary.html#term-mapping
2: https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping

Linked PRs
  • gh-149348

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

Review linked PR gh-149348 first, then inspect the glossary mapping entry and the collections.abc.Mapping and collections.abc.MutableMapping documentation linked in the report. Update the documentation so the required mapping methods are described without the two entries referring circularly to each other.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.