Results of 1 - 4 of about 4 for MyIterable (0.007 sec.)
- abc --- 抽象基底クラス — Python 3.14.8 ドキュメント 11372
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » abc --- 抽象基底クラス テーマ 自動 ライト ダーク | abc --- 抽象基底クラス ¶ ソースコード: Lib/abc.py こ
...oo : def __getitem__ ( self , index ): ... def __len__ ( self ): ... def get_iterator ( self ): return iter ( self ) class MyIterable ( ABC ): @abstractmethod def __iter__ ( self ): while False : yield None def get_iterator ( self ): return self . __iter__...() @classmethod def __subclasshook__ ( cls , C ): if cls is MyIterable : if any ( "__iter__" in B . __dict__ for B in C . __mro__ ): return True return NotImplemented MyIterable . register ( Fo...o ) The ABC MyIterable defines the standard iterable method, __iter__() , as an abstract method. The implementation given here can still be calle... - https://man.mtool.work/python/3.14/library/abc.html
- abc --- 抽象基底クラス — Python 3.14.8 ドキュメント 10781
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » abc --- 抽象基底クラス テーマ 自動 ライト ダーク | abc --- 抽象基底クラス ¶ ソースコード: Lib/abc.py こ
...oo : def __getitem__ ( self , index ): ... def __len__ ( self ): ... def get_iterator ( self ): return iter ( self ) class MyIterable ( ABC ): @abstractmethod def __iter__ ( self ): while False : yield None def get_iterator ( self ): return self . __iter__...() @classmethod def __subclasshook__ ( cls , C ): if cls is MyIterable : if any ( "__iter__" in B . __dict__ for B in C . __mro__ ): return True return NotImplemented MyIterable . register ( Fo...o ) The ABC MyIterable defines the standard iterable method, __iter__() , as an abstract method. The implementation given here can still be calle... - https://man.mtool.work/python/3.14/library/abc.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 7397
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...とります。 Using a generic class without specifying type parameters assumes Any for each position. In the following example, MyIterable is not generic but implicitly inherits from Iterable[Any] : from collections.abc import Iterable class MyIterable ( Iterab... - https://man.mtool.work/python/3.14/library/typing.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 7397
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...とります。 Using a generic class without specifying type parameters assumes Any for each position. In the following example, MyIterable is not generic but implicitly inherits from Iterable[Any] : from collections.abc import Iterable class MyIterable ( Iterab... - https://man.mtool.work/python/3.14/library/typing.html
PREV
1
NEXT