Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ Glossary
See :mod:`typing` and :pep:`484`, which describe this functionality.

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
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.

attribute, or a function parameter or return value.

Type hints are optional and are not enforced by Python but
Expand Down
Loading