The explanation of "Annotating callable objects" section should be made better
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Documentation
*Notes:
- Python 3.14.3
- Related: #145602
In the explanation of Annotating callable objects section, some words or sentence aren't clear, distinct, specific, concise and less common, and the word argument is misused, etc. So they should be corrected:
<Some examples>
The 1st one:
*Notes:
- "has" is better than "takes" because "takes" sounds taking an argument but not parameter:
... a function that takes a single parameter of type
intand returns astr.
... a function that has a single parameter of type
intand returns astr.
The 2nd one:
*Notes:
- Naming and calling
[]"type specification" is more understandable than "subscription syntax". - "must" is enough for emphasis so "always" and "exactly" aren't needed, emphasizing too much.
- "two objects" are better than "two values" because "two values" sounds actual values like
v = "Hello"'s"Hello"so it's confusing while talking about types. - "parameter type list" is better than "argument list" because "parameter" is correct and "type list" is more specific and understandable.
The subscription syntax must always be used with exactly two values: the
argument list and the return type.
The type specification
[]must have two objects, a parameter type list and return type.
etc.
Linked PRs
- gh-145576
- gh-145598
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Abschnitt "Annotating callable objects" in der Python-Typing-Dokumentation und verwende die Formulierungsbeispiele sowie die verwandten Issues #145602, #145576 und #145598 als Kontext. Überprüfe die vorgeschlagenen Änderungen an Terminologie und Sätzen und bestätige anschließend, dass der Abschnitt durchgehend klare Unterscheidungen zwischen Parametern, Argumenten, Objekten und Typen verwendet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100