Results of 1 - 10 of about 100 for classmethod (0.010 sec.)
- abc --- 抽象基底クラス — Python 3.14.8 ドキュメント 12964
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » abc --- 抽象基底クラス テーマ 自動 ライト ダーク | abc --- 抽象基底クラス ¶ ソースコード: Lib/abc.py こ
...issubclass() further without the need to call register() on every class you want to consider a subclass of the ABC. (This class method is called from the __subclasscheck__() method of the ABC.) This method should return True , False or NotImplemented . If...C ): @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__ ): retur...terable abstract base class, but it does not have to be overridden in non-abstract derived classes. The __subclasshook__() class method defined here says that any class that has an __iter__() method in its __dict__ (or in that of one of its base classes, ac... - https://man.mtool.work/python/3.14/library/abc.html
- abc --- 抽象基底クラス — Python 3.14.8 ドキュメント 12964
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » abc --- 抽象基底クラス テーマ 自動 ライト ダーク | abc --- 抽象基底クラス ¶ ソースコード: Lib/abc.py こ
...issubclass() further without the need to call register() on every class you want to consider a subclass of the ABC. (This class method is called from the __subclasscheck__() method of the ABC.) This method should return True , False or NotImplemented . If...C ): @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__ ): retur...terable abstract base class, but it does not have to be overridden in non-abstract derived classes. The __subclasshook__() class method defined here says that any class that has an __iter__() method in its __dict__ (or in that of one of its base classes, ac... - https://man.mtool.work/python/3.14/library/abc.html
- datetime --- 基本的な日付と時間の型 — Python 3.14.8 ドキュメント 9700
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » datetime --- 基本的な日付と時間の型 テーマ 自動 ライト ダーク | datetime --- 基本的な日付と時間の型 ¶ ソースコード: Lib/
...範囲を超えた引数を与えた場合、 ValueError が送出されます。 他のコンストラクタ、および全てのクラスメソッドを以下に示します: classmethod date. today ( ) ¶ 現在のローカルな日付を返します。 date.fromtimestamp(time.time()) と等価です。 classmethod date. fromtime...owError を送出するようになりました。 localtime() の呼び出し失敗で ValueError ではなく OSError を送出するようになりました。 classmethod date. fromordinal ( ordinal ) ¶ Return the date corresponding to the proleptic Gregorian ordinal , where January 1 of year...ordinal() でない場合、 ValueError が送出されます。 任意の日付 d に対し、 date.fromordinal(d.toordinal()) == d となります。 classmethod date. fromisoformat ( date_string ) ¶ 以下の例外を除く、有効な ISO 8601 フォーマットで与えられた date_string に対応する da... - https://man.mtool.work/python/3.14/library/datetime.html
- datetime --- 基本的な日付と時間の型 — Python 3.14.8 ドキュメント 9700
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » datetime --- 基本的な日付と時間の型 テーマ 自動 ライト ダーク | datetime --- 基本的な日付と時間の型 ¶ ソースコード: Lib/
...範囲を超えた引数を与えた場合、 ValueError が送出されます。 他のコンストラクタ、および全てのクラスメソッドを以下に示します: classmethod date. today ( ) ¶ 現在のローカルな日付を返します。 date.fromtimestamp(time.time()) と等価です。 classmethod date. fromtime...owError を送出するようになりました。 localtime() の呼び出し失敗で ValueError ではなく OSError を送出するようになりました。 classmethod date. fromordinal ( ordinal ) ¶ Return the date corresponding to the proleptic Gregorian ordinal , where January 1 of year...ordinal() でない場合、 ValueError が送出されます。 任意の日付 d に対し、 date.fromordinal(d.toordinal()) == d となります。 classmethod date. fromisoformat ( date_string ) ¶ 以下の例外を除く、有効な ISO 8601 フォーマットで与えられた date_string に対応する da... - https://man.mtool.work/python/3.14/library/datetime.html
- デスクリプタオブジェクト (descriptor object) — Python 3.14.8 ドキュメント 8322
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » デスクリプタオブジェクト (descriptor object) テーマ 自動 ライト ダーク | デスクリプタ
...ods implemented via wrapper structures, and appear in Python as types.WrapperDescriptorType objects. PyObject * PyDescr_NewClassMethod ( PyTypeObject * type , PyMethodDef * method ) ¶ 戻り値: 新しい参照。 次に属します: Stable ABI . Create a new class method...descriptor for extension type type from the PyMethodDef structure method . Class method descriptors expose C methods that receive the class rather than an instance when accessed. This is the same kind of descr...iptor created for METH_CLASS entries in tp_methods , and it appears in Python as a types.ClassMethodDescriptorType object. On success, return a strong reference to the descriptor. Return NULL with an exception set on failur... - https://man.mtool.work/python/3.14/c-api/descriptor.html
- デスクリプタオブジェクト (descriptor object) — Python 3.14.8 ドキュメント 8322
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » デスクリプタオブジェクト (descriptor object) テーマ 自動 ライト ダーク | デスクリプタ
...ods implemented via wrapper structures, and appear in Python as types.WrapperDescriptorType objects. PyObject * PyDescr_NewClassMethod ( PyTypeObject * type , PyMethodDef * method ) ¶ 戻り値: 新しい参照。 次に属します: Stable ABI . Create a new class method...descriptor for extension type type from the PyMethodDef structure method . Class method descriptors expose C methods that receive the class rather than an instance when accessed. This is the same kind of descr...iptor created for METH_CLASS entries in tp_methods , and it appears in Python as a types.ClassMethodDescriptorType object. On success, return a strong reference to the descriptor. Return NULL with an exception set on failur... - https://man.mtool.work/python/3.14/c-api/descriptor.html
- デスクリプタ ガイド — Python 3.14.8 ドキュメント 7984
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » デスクリプタ ガイド テーマ 自動 ライト ダーク | デスクリプタ ガイド ¶ Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を
...Read this if you're curious about how functions turn into bound methods or about the implementation of common tools like @classmethod , @staticmethod , @property , and __slots__ . 入門 ¶ この入門では、なるべく基礎的なところから開始し、新しい要素を一つずつ紹...ようにします。 Descriptors are used throughout the language. It is how functions turn into bound methods. Common tools like @classmethod , @staticmethod , @property , and @functools.cached_property are all implemented as descriptors. 実践的なサンプル ¶ このサ...。 Descriptors are a powerful, general purpose protocol. They are the mechanism behind properties, methods, static methods, class methods, and super() . They are used throughout Python itself. Descriptors simplify the underlying C code and offer a flexible s... - https://man.mtool.work/python/3.14/howto/descriptor.html
- What's New in Python 2.4 — Python 3.14.8 ドキュメント 7984
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.4 テーマ 自動 ライト ダーク | What's New in Python 2.4 ¶ 著者 : A.M. Kuchling この文書は 2005 年 3 月 30 日にリリー
...はしませんでした。このため、 def でメソッドは普通に書いたのち、新型メソッドとしての関数へ仕立て上げる staticmethod() または classmethod() にその結果のメソッドを渡す、という手順を取る必要がありました。このような具合でした: class C : def meth ( cls ): ... meth...= classmethod ( meth ) # Rebind name to wrapped-up class method メソッドがとても長かったりすると、関数のボディの後ろの classmethod() 呼び...機能はこの要求に合うように追加されました。 この新たな機能は「関数デコレータ (function decorators)」と呼ばれます。この名前は classmethod() , staticmethod() , とその仲間たちが関数オブジェクトに追加的な情報を保存することから着想を得たものです; それらは関数をより... - https://man.mtool.work/python/3.14/whatsnew/2.4.html
- デスクリプタ ガイド — Python 3.14.8 ドキュメント 7984
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » デスクリプタ ガイド テーマ 自動 ライト ダーク | デスクリプタ ガイド ¶ Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を
...Read this if you're curious about how functions turn into bound methods or about the implementation of common tools like @classmethod , @staticmethod , @property , and __slots__ . 入門 ¶ この入門では、なるべく基礎的なところから開始し、新しい要素を一つずつ紹...ようにします。 Descriptors are used throughout the language. It is how functions turn into bound methods. Common tools like @classmethod , @staticmethod , @property , and @functools.cached_property are all implemented as descriptors. 実践的なサンプル ¶ このサ...。 Descriptors are a powerful, general purpose protocol. They are the mechanism behind properties, methods, static methods, class methods, and super() . They are used throughout Python itself. Descriptors simplify the underlying C code and offer a flexible s... - https://man.mtool.work/python/3.14/howto/descriptor.html
- What's New in Python 2.4 — Python 3.14.8 ドキュメント 7984
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New in Python 2.4 テーマ 自動 ライト ダーク | What's New in Python 2.4 ¶ 著者 : A.M. Kuchling この文書は 2005 年 3 月 30 日にリリー
...はしませんでした。このため、 def でメソッドは普通に書いたのち、新型メソッドとしての関数へ仕立て上げる staticmethod() または classmethod() にその結果のメソッドを渡す、という手順を取る必要がありました。このような具合でした: class C : def meth ( cls ): ... meth...= classmethod ( meth ) # Rebind name to wrapped-up class method メソッドがとても長かったりすると、関数のボディの後ろの classmethod() 呼び...機能はこの要求に合うように追加されました。 この新たな機能は「関数デコレータ (function decorators)」と呼ばれます。この名前は classmethod() , staticmethod() , とその仲間たちが関数オブジェクトに追加的な情報を保存することから着想を得たものです; それらは関数をより... - https://man.mtool.work/python/3.14/whatsnew/2.4.html