per page, with , order by , clip by
Results of 1 - 10 of about 19 for decorator (0.013 sec.)
ast --- 抽象構文木 12943
ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在 ... nctionType ( expr * argtypes , expr returns ) stmt = FunctionDef ( identifier name , arguments args , stmt * body , expr * decorator_list , expr ? returns , string ? type_comment , type_param * type_params ) | AsyncFunctionDef ( identifier name , argument ... s args , stmt * body , expr * decorator_list , expr ? returns , string ? type_comment , type_param * type_params ) | ClassDef ( identifier name , expr * bases , k ... eyword * keywords , stmt * body , expr * decorator_list , type_param * type_params ) | Return ( expr ? value ) | Delete ( expr * targets ) | Assign ( expr * targets , expr v ...
https://man.mtool.work/python/3.14/library/ast.html
Python 3.15 で削除予定 12225
Python 3.15 で削除予定 インポートシステム: Setting __cached__ on a module while failing to set __spec__.cached is deprecated. In Python 3.15, __cached__ will cease to be set or take into consideration by the import system or standard librar ... ct を作成するには、 class TD(TypedDict): pass または TD = TypedDict("TD", {}) を使ってください。 The @typing.no_type_check_decorator decorator function has been deprecated since Python 3.13. After eight years in the typing module, it has yet to be support ...
https://man.mtool.work/python/3.14/deprecations/pending-removal-in-3.15.html
8. 複合文 (compound statement) 10415
8. 複合文 (compound statement) 複合文には、他の文 (のグループ) が入ります; 複合文は、中に入っている他の文の実行の制御に何らかのやり方で影響を及ぼします。一般的には、複合文は複数行にまたがって書かれますが、全部の文を一行に連ねた単純な書き方も ... マッチ: チュートリアル 8.7. 関数定義 関数定義は、ユーザ定義関数オブジェクトを定義します ( 標準型の階層 節参照): funcdef : [ decorators ] "def" funcname [ type_params ] "(" [ parameter_list ] ")" [ "->" expression ] ":" suite decorators : decorator + decora ... 3129 で導入されました。 8.8. クラス定義 クラス定義は、クラスオブジェクトを定義します ( 標準型の階層 節参照): classdef : [ decorators ] "class" classname [ type_params ] [ inheritance ] ":" suite inheritance : "(" [ argument_list ] ")" classname : identif ... ドデコレータは PEP 318 で導入されました。 8.9. コルーチン Added in version 3.5. 8.9.1. コルーチン関数定義 async_funcdef : [ decorators ] "async" "def" funcname "(" [ parameter_list ] ")" [ "->" expression ] ":" suite Python のコルーチンの実行は、多くの箇所 ...
https://man.mtool.work/python/3.14/reference/compound_stmts.html
dataclasses --- データクラス 10057
dataclasses --- データクラス ソースコード: Lib/dataclasses.py このモジュールは、 __init__() や __repr__() のような 特殊メソッド を生成し、ユーザー定義のクラスに自動的に追加するデコレーターや関数を提供します。このモジュールは元々、 PEP 557 で ... ue , kw_only = False , slots = False , weakref_slot = False ) この関数は、後述する 特殊メソッド を生成し、クラスに追加する decorator です。 @dataclass デコレータは、 field を探すためにクラスを検査します。 field は 型アノテーション を持つクラス変数として定 ... sh = False , frozen = False , match_args = True , kw_only = False , slots = False , weakref_slot = False , module = None , decorator = dataclass ) 名前を cls_name 、フィールドを fields の定義、基底クラスを bases に指定したものとする新しいデータクラスを作成 ... 定した場合、データクラスの __module__ 属性はその値に設定されます。 デフォルトでは、呼び出し元のモジュール名に設定されます。 decorator パラメータは、データクラスの作成に使用する呼び出し可能オブジェクトです。 最初の引数としてクラスオブジェクトを取り、 @datac ...
https://man.mtool.work/python/3.14/library/dataclasses.html
typing --- 型ヒントのサポート 9323
typing --- 型ヒントのサポート Added in version 3.5. ソースコード: Lib/typing.py 注釈 Python ランタイムは、関数や変数の型アノテーションを強制しません。型アノテーションは、 type checkers や IDE、linterなどのサードパーティーツールで使われます。 ... protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes without this decorator cannot be used as the second argument to isinstance() or issubclass() . プロトコルクラスはジェネリックにもできます。例えば ... ノテーションを無視します。 @no_type_check は、デコレートしたオブジェクトをインプレースに変更します。 @ typing. no_type_check_decorator Decorator to give another decorator the no_type_check() effect. This wraps the decorator with something that wraps the dec ... type_check() . バージョン 3.13 で非推奨、バージョン 3.15 で削除予定: No type checker ever added support for @no_type_check_decorator . It is therefore deprecated, and will be removed in Python 3.15. @ typing. override サブクラスのメソッドが、スーパークラス ...
https://man.mtool.work/python/3.14/library/typing.html
非推奨 8964
非推奨 Python 3.15 で削除予定 インポートシステム: Setting __cached__ on a module while failing to set __spec__.cached is deprecated. In Python 3.15, __cached__ will cease to be set or take into consideration by the import system or standard ... Use class TD(TypedDict): pass or TD = TypedDict("TD", {}) to create a TypedDict with zero field. The @typing.no_type_check_decorator decorator function has been deprecated since Python 3.13. After eight years in the typing module, it has yet to be support ...
https://man.mtool.work/python/3.14/deprecations/
functools --- 高階関数と呼び出し可能オブジェクトの操作 8605
functools --- 高階関数と呼び出し可能オブジェクトの操作 ソースコード: Lib/functools.py functools モジュールは、ほかの関数を操作したり返したりする高階関数のためのモジュールです。 一般に、このモジュールではあらゆる呼び出し可能オブジェクトを関数 ... apper, wrapped=wrapped, assigned=assigned, updated=updated) と等価です。例えば: >>> from functools import wraps >>> def my_decorator ( f ): ... @wraps ( f ) ... def wrapper ( * args , ** kwds ): ... print ( 'Calling decorated function' ) ... return f ( * ... args , ** kwds ) ... return wrapper ... >>> @my_decorator ... def example (): ... """Docstring""" ... print ( 'Called example function' ) ... >>> example () Calling decorated funct ... 成されません。 他のマニュアルの関連ページ PHP func_num_args() Django 1.4.12 Django 1.5.7 PHP yac.getter PHP lua.call Django decorators ...
https://man.mtool.work/python/3.14/library/functools.html
What's New In Python 3.13 8605
What's New In Python 3.13 エディタ : Adam Turner と Thomas Wouters この記事では Python 3.12 と比較した Python 3.13 の新機能を解説します。Python 3.13 は2024年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP 71 ... ("TD", {}) を使ってください。 (Alex Waygood による gh-105566 and gh-105570 での貢献。) Deprecate the @typing.no_type_check_decorator decorator function, to be removed in Python 3.15. After eight years in the typing module, it has yet to be supported by an ... ct を作成するには、 class TD(TypedDict): pass または TD = TypedDict("TD", {}) を使ってください。 The @typing.no_type_check_decorator decorator function has been deprecated since Python 3.13. After eight years in the typing module, it has yet to be support ...
https://man.mtool.work/python/3.14/whatsnew/3.13.html
Logging クックブック 7513
Logging クックブック Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に有用であるとされていた、logging に関連するいくつものレシピを含んでいます。チュートリアルやリファレンス情報へのリンクについては その他のリソース ... ity is None : capacity = 100 handler = MemoryHandler ( capacity , flushLevel = flush_level , target = target_handler ) def decorator ( fn ): def wrapper ( * args , ** kwargs ): logger . addHandler ( handler ) try : return fn ( * args , ** kwargs ) except ... d' ) raise finally : super ( MemoryHandler , handler ) . flush () logger . removeHandler ( handler ) return wrapper return decorator def write_line ( s ): sys . stderr . write ( ' %s \n ' % s ) def foo ( fail = False ): write_line ( 'about to log at DEBUG ...
https://man.mtool.work/python/3.14/howto/logging-cookbook.html
contextlib --- with 文コンテキスト用ユーティリティ 7513
contextlib --- with 文コンテキスト用ユーティリティ ソースコード: Lib/contextlib.py このモジュールは with 文に関わる一般的なタスクのためのユーティリティを提供します。詳しい情報は、 コンテキストマネージャ型 と with文とコンテキストマネージャ を ... トマネージャは with 文に対して例外が処理されたことを示し、 with 文の直後の文から実行を再開します。 @contextmanager は ContextDecorator を使用するため、作成したコンテキストマネージャは with 文でもデコレータとしても使用できます。 デコレータとして使う場合は、関 ... ネージャも、デコレータとして使うための複数回の呼び出しをサポートするという要件を満たせます)。 バージョン 3.2 で変更: ContextDecorator の使用。 @ contextlib. asynccontextmanager @~contextlib.contextmanager に似ていますが、 非同期コンテキストマネージャ を作成 ... します。 この関数は async with 文のための非同期コンテキストマネージャのファクトリ関数を定義するために利用できるデコレータ ( decorator ) です。新しいクラスや __aenter__() と __aexit__() メソッドを個別に定義する必要はありません。このデコレータは非同期ジェネレ ...
https://man.mtool.work/python/3.14/library/contextlib.html
PREV 1 2 NEXT