mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[doc] Fix link to abc.collections.Iterable (GH-22520)
Missed this occurrence before, sorry. Also changed "the PEP" to "PEP".
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 3fe6148937
)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
This commit is contained in:
parent
8ca08310a8
commit
e89253756c
1 changed files with 2 additions and 2 deletions
|
@ -406,10 +406,10 @@ Initially :pep:`484` defined Python static type system as using
|
|||
a class ``B`` is expected if and only if ``A`` is a subclass of ``B``.
|
||||
|
||||
This requirement previously also applied to abstract base classes, such as
|
||||
:class:`Iterable`. The problem with this approach is that a class had
|
||||
:class:`~collections.abc.Iterable`. The problem with this approach is that a class had
|
||||
to be explicitly marked to support them, which is unpythonic and unlike
|
||||
what one would normally do in idiomatic dynamically typed Python code.
|
||||
For example, this conforms to the :pep:`484`::
|
||||
For example, this conforms to :pep:`484`::
|
||||
|
||||
from collections.abc import Sized, Iterable, Iterator
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue