python / python/typing

[spec] conceptual foundation and glossary entries for variance

Open
#1,797 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: typing spec
Dominant language
Python
Stars
1.8k
Forks
302
Avg merge
23h
Merged PRs (30d)
8

Description

Currently the section on variance says:

A longer introduction to these concepts can be found on Wikipedia and in PEP 483; here we just show how to control a type checker’s behavior.

Now that we have a core concepts section in the spec, it would be good for the spec to also derive the rationale for variance from those core concepts, rather than deferring to the (ten-year-old and not updatable) PEP 483.

We should also add glossary entries for variance terminology: invariant, covariant, contravariant, and variance.

Contributor guide

No contributing guide indexed for this repository

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 spec's section on variance and the existing core concepts section, then compare the rationale in PEP 483 and the linked Wikipedia article. Done means the variance section derives its rationale from the core concepts and the glossary defines invariant, covariant, contravariant, and variance.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.