python / python/typing

Spec: `Final` section could use better definition for `Final` vs. `Final[X]`

Open Beginner friendly
#2,356 2 comments 1 reaction 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

Came up in #2353: Currently, the syntax section for Final uses the following definitions:

Final may be used in one of several forms:

  • With an explicit type, using the syntax Final[<type>] [...]
  • With no type annotation. [...]

As @carljm points out, these definitions are not great. I suggest to give them better names and use those consistently in the spec (and elsewhere). Carl used "bare" for the latter case, which I like. Maybe "explicitly typed" for the former? "When using a bare Final ..." or "When using an explicitly typed Final ..."

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 specification's syntax section for Final and search the spec and related documentation for the existing descriptions of Final and Final[X]. Done means the two forms have clear, consistently named definitions using terms such as “bare” and “explicitly typed,” without leaving conflicting wording elsewhere.

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
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.