mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)
Follow up to7cdf30fff3
and4173320920
. This addresses the point "1. Update links in typing, subscription and union to point to GenericAlias." in the bpo for this PR.
This commit is contained in:
parent
3317466061
commit
9129af6050
2 changed files with 75 additions and 44 deletions
|
@ -837,14 +837,8 @@ this method will need to explicitly add that support.
|
|||
A string's items are characters. A character is not a separate data type but a
|
||||
string of exactly one character.
|
||||
|
||||
..
|
||||
At the time of writing this, there is no documentation for generic alias
|
||||
or PEP 585. Thus the link currently points to PEP 585 itself.
|
||||
Please change the link for generic alias to reference the correct
|
||||
documentation once documentation for PEP 585 becomes available.
|
||||
|
||||
Subscription of certain :term:`classes <class>` or :term:`types <type>`
|
||||
creates a `generic alias <https://www.python.org/dev/peps/pep-0585/>`_.
|
||||
creates a :ref:`generic alias <types-genericalias>`.
|
||||
In this case, user-defined classes can support subscription by providing a
|
||||
:meth:`__class_getitem__` classmethod.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue