Skip to content

Replace type with types for the explanation type hint in glossary.rst#141668

Closed
hyperkai wants to merge 1 commit intopython:mainfrom
hyperkai:patch-1
Closed

Replace type with types for the explanation type hint in glossary.rst#141668
hyperkai wants to merge 1 commit intopython:mainfrom
hyperkai:patch-1

Conversation

@hyperkai
Copy link
Copy Markdown

@hyperkai hyperkai commented Nov 17, 2025

I replaced type with types for the explanation type hint in glossary.rst because a type hint can have multiple(one or more) types.


📚 Documentation preview 📚: https://cpython-previews--141668.org.readthedocs.build/


type hint
An :term:`annotation` that specifies the expected type for a variable, a class
An :term:`annotation` that specifies the expected types for a variable, a class
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, the current one makes sense, if we take for example x: int | None than "int | None" is a typing.Union, i.e. a single object. Similarly, the union of two sets is a set, not sets.

@JelleZijlstra
Copy link
Copy Markdown
Member

The current text is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants