collections.abc.Collection
https://docs.python.org/ja/3/library/collections.abc.html#collections.abc.Collection
サイズ付きのイテラブルなコンテナクラスの ABC です。
実装
https://github.com/python/cpython/blob/v3.11.2/Lib/_collections_abc.py#L405-L413
class Collection(Sized, Iterable, Container):
__subclasshook__
で
__len__
,
__iter__
,
__contains__
を
_check_methods
している
__len__
はSized
__iter__
はIterable
__contains__
はContainer
👉
abc.ABCMeta.__subclasshook__
👉
(積ん読)collections.abc._check_methods