Results of 1 - 10 of about 88 for decorator (0.010 sec.)
- test --- Regression tests package for Python — Python 3.14.8 ドキュメント 11568
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » test --- Regression tests package for Python テーマ 自動 ライト ダーク | test --- Regression tests package for Python
...rt that the sys.getsizeof for o plus the GC header size equals size . @ test.support. anticipate_failure ( condition ) ¶ A decorator to conditionally mark tests with @unittest.expectedFailure . Any use of this decorator should have an associated comment i...dentifying the relevant tracker issue. test.support. system_must_validate_cert ( f ) ¶ A decorator that skips the decorated test on TLS certification validation failures. @ test.support. run_with_locale ( catstr , * local...す。 渡された locales が順々に試され、一番最初に出てきた妥当なロケールが使われます。 @ test.support. run_with_tz ( tz ) ¶ A decorator for running a function in a specific timezone, correctly resetting it after it has finished. @ test.support. requires_free... - https://man.mtool.work/python/3.14/library/test.html
- test --- Regression tests package for Python — Python 3.14.8 ドキュメント 11568
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » test --- Regression tests package for Python テーマ 自動 ライト ダーク | test --- Regression tests package for Python
...rt that the sys.getsizeof for o plus the GC header size equals size . @ test.support. anticipate_failure ( condition ) ¶ A decorator to conditionally mark tests with @unittest.expectedFailure . Any use of this decorator should have an associated comment i...dentifying the relevant tracker issue. test.support. system_must_validate_cert ( f ) ¶ A decorator that skips the decorated test on TLS certification validation failures. @ test.support. run_with_locale ( catstr , * local...す。 渡された locales が順々に試され、一番最初に出てきた妥当なロケールが使われます。 @ test.support. run_with_tz ( tz ) ¶ A decorator for running a function in a specific timezone, correctly resetting it after it has finished. @ test.support. requires_free... - https://man.mtool.work/python/3.14/library/test.html
- abc --- 抽象基底クラス — Python 3.14.8 ドキュメント 10871
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » abc --- 抽象基底クラス テーマ 自動 ライト ダーク | abc --- 抽象基底クラス ¶ ソースコード: Lib/abc.py こ
...make get_iterator available as a method of Foo , so it is provided separately. The abc module also provides the following decorator: @ abc. abstractmethod ¶ 抽象メソッドを示すデコレータです。 Using this decorator requires that the class's metaclass is AB...ected. When @abstractmethod is applied in combination with other method descriptors, it should be applied as the innermost decorator, as shown in the following usage examples: class C ( ABC ): @abstractmethod def my_abstract_method ( self , arg1 ): ... @c...重継承を使ったフレームワークにおいて super 呼び出しの終点として有効です。 The abc module also supports the following legacy decorators: @ abc. abstractclassmethod ¶ Added in version 3.2. バージョン 3.3 で非推奨: It is now possible to use @classmethod with... - https://man.mtool.work/python/3.14/library/abc.html
- abc --- 抽象基底クラス — Python 3.14.8 ドキュメント 10871
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » abc --- 抽象基底クラス テーマ 自動 ライト ダーク | abc --- 抽象基底クラス ¶ ソースコード: Lib/abc.py こ
...make get_iterator available as a method of Foo , so it is provided separately. The abc module also provides the following decorator: @ abc. abstractmethod ¶ 抽象メソッドを示すデコレータです。 Using this decorator requires that the class's metaclass is AB...ected. When @abstractmethod is applied in combination with other method descriptors, it should be applied as the innermost decorator, as shown in the following usage examples: class C ( ABC ): @abstractmethod def my_abstract_method ( self , arg1 ): ... @c...重継承を使ったフレームワークにおいて super 呼び出しの終点として有効です。 The abc module also supports the following legacy decorators: @ abc. abstractclassmethod ¶ Added in version 3.2. バージョン 3.3 で非推奨: It is now possible to use @classmethod with... - https://man.mtool.work/python/3.14/library/abc.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 10268
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...って構造的部分型というものを満喫できます。 モジュールの内容 ¶ The typing module defines the following classes, functions and decorators. 特殊型付けプリミティブ ¶ 特殊型 ¶ These can be used as types in annotations. They do not support subscription using [] ....aramSpec parameters. The last parameter to Concatenate must be a ParamSpec or ellipsis ( ... ). For example, to annotate a decorator with_lock which provides a threading.Lock to the decorated function, Concatenate can be used to indicate that with_lock ex...= Lock () def with_lock [ ** P , R ]( f : Callable [ Concatenate [ Lock , P ], R ]) -> Callable [ P , R ]: '''A type-safe decorator which provides a lock.''' def inner ( * args : P . args , ** kwargs : P . kwargs ) -> R : # Provide the lock as the first... - https://man.mtool.work/python/3.14/library/typing.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 10268
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...って構造的部分型というものを満喫できます。 モジュールの内容 ¶ The typing module defines the following classes, functions and decorators. 特殊型付けプリミティブ ¶ 特殊型 ¶ These can be used as types in annotations. They do not support subscription using [] ....aramSpec parameters. The last parameter to Concatenate must be a ParamSpec or ellipsis ( ... ). For example, to annotate a decorator with_lock which provides a threading.Lock to the decorated function, Concatenate can be used to indicate that with_lock ex...= Lock () def with_lock [ ** P , R ]( f : Callable [ Concatenate [ Lock , P ], R ]) -> Callable [ P , R ]: '''A type-safe decorator which provides a lock.''' def inner ( * args : P . args , ** kwargs : P . kwargs ) -> R : # Provide the lock as the first... - https://man.mtool.work/python/3.14/library/typing.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.14.8 ドキュメ... 9276
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » functools --- 高階関数と呼び出し可能オブジェクトの操作 テーマ 自動 ライト ダーク | functools ---
...is instrumented with a cache_info() function that returns a named tuple showing hits , misses , maxsize and currsize . The decorator also provides a cache_clear() function for clearing or invalidating the cache. 元々の基底の関数には、 __wrapped__ 属性を通...ることがわかった場合は、代わりに 6 つの拡張比較メソッドをすべて実装すれば、簡単にスピードアップを図れるでしょう。 注釈 This decorator makes no attempt to override methods that have been declared in the class or its superclasses . Meaning that if a supercla...数を シングルディスパッチ ジェネリック関数 に変換します。 To define a generic function, decorate it with the @singledispatch decorator. When defining a function using @singledispatch , note that the dispatch happens on the type of the first argument: >>> fr... - https://man.mtool.work/python/3.14/library/functools.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.14.8 ドキュメ... 9276
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » functools --- 高階関数と呼び出し可能オブジェクトの操作 テーマ 自動 ライト ダーク | functools ---
...is instrumented with a cache_info() function that returns a named tuple showing hits , misses , maxsize and currsize . The decorator also provides a cache_clear() function for clearing or invalidating the cache. 元々の基底の関数には、 __wrapped__ 属性を通...ることがわかった場合は、代わりに 6 つの拡張比較メソッドをすべて実装すれば、簡単にスピードアップを図れるでしょう。 注釈 This decorator makes no attempt to override methods that have been declared in the class or its superclasses . Meaning that if a supercla...数を シングルディスパッチ ジェネリック関数 に変換します。 To define a generic function, decorate it with the @singledispatch decorator. When defining a function using @singledispatch , note that the dispatch happens on the type of the first argument: >>> fr... - https://man.mtool.work/python/3.14/library/functools.html
- dataclasses --- データクラス — Python 3.14.8 ドキュメント 8485
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L
..., kw_only = False , slots = False , weakref_slot = False ) ¶ この関数は、後述する 特殊メソッド を生成し、クラスに追加する decorator です。 @dataclass デコレータは、 field を探すためにクラスを検査します。 field は 型アノテーション を持つクラス変数として定...は呼び出した際に指定したクラスと同じクラスを返します。新しいクラスは生成されません。 If @dataclass is used just as a simple decorator with no parameters, it acts as if it has the default values documented in this signature. That is, these three uses of @da...programmer's intent, the existence and behavior of __eq__() , and the values of the eq and frozen flags in the @dataclass decorator. By default, @dataclass will not implicitly add a __hash__() method unless it is safe to do so. Neither will it add or cha... - https://man.mtool.work/python/3.14/library/dataclasses.html
- dataclasses --- データクラス — Python 3.14.8 ドキュメント 8485
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L
..., kw_only = False , slots = False , weakref_slot = False ) ¶ この関数は、後述する 特殊メソッド を生成し、クラスに追加する decorator です。 @dataclass デコレータは、 field を探すためにクラスを検査します。 field は 型アノテーション を持つクラス変数として定...は呼び出した際に指定したクラスと同じクラスを返します。新しいクラスは生成されません。 If @dataclass is used just as a simple decorator with no parameters, it acts as if it has the default values documented in this signature. That is, these three uses of @da...programmer's intent, the existence and behavior of __eq__() , and the values of the eq and frozen flags in the @dataclass decorator. By default, @dataclass will not implicitly add a __hash__() method unless it is safe to do so. Neither will it add or cha... - https://man.mtool.work/python/3.14/library/dataclasses.html