collections.abc — Abstract Base Classes for Containers — Python 3.9.25 documentation

docs.python.org

Tin mới

collections — Container datatypes

heapq — Heap queue algorithm

Python documentation for the current stable release

Python documentation for the current stable release

New in version 3.3: Formerly, this module was part of the collections module.

Python Module Index

3.9.25 Documentation

The Python Standard Library

abstract base classes

New in version 3.3: Formerly, this module was part of the collections module.

Generic Alias Type

New in version 3.9: These abstract classes now support []. See Generic Alias Type and PEP 585.

object.__contains__

ABC for classes that provide the __contains__() method.

asyncio.coroutine()

In CPython, generator-based coroutines (generators decorated with types.coroutine() or asyncio.coroutine()) are awaitables, even though they do not have an __await__() method. Using isinstance(gencoro, Awaitable) for the

inspect.isawaitable()

In CPython, generator-based coroutines (generators decorated with types.coroutine() or asyncio.coroutine()) are awaitables, even though they do not have an __await__() method. Using isinstance(gencoro, Awaitable) for the

abc: Abstract base classes according to :pep:`3119`.

For more about ABCs, see the abc module and PEP 3119.