Results of 1 - 10 of about 90 for Func (0.006 sec.)
- インスタンスメソッドオブジェクト(Instance Method Objects) 11454
- インスタンスメソッドオブジェクト(Instance Method Objects) インスタンスメソッドは PyCFunction のラッパーであり、 PyCFunction をクラスオブジェクトに束縛する新しい方法です。 以前の PyMethod_New(func, NULL, class) 呼び出しに代わるものです。 PyT
...場合に真を返します。パラメータは NULL にできません。この関数は常に成功します。 PyObject * PyInstanceMethod_New ( PyObject * func ) 戻り値: 新しい参照。 任意の呼び出し可能オブジェクト func を使った新たなインスタンスメソッドオブジェクトを返します。 func...はインスタンスメソッドが呼び出されたときに呼び出される関数です。 PyObject * PyInstanceMethod_Function ( PyObject * im ) 戻り値: 借用参照。 インスタンスメソッド im に関連付けられた関数オブジェクトを返します。 PyObject * P...yInstanceMethod_GET_FUNCTION ( PyObject * im ) 戻り値: 借用参照。 PyInstanceMethod_Function() のマクロ版で、エラーチェックを行いません。 メソッドオ... - https://man.mtool.work/python/3.14/c-api/method.html
- atexit --- 終了ハンドラー 10254
- atexit --- 終了ハンドラー atexit モジュールは、 終了ハンドラー を登録・解除する関数を定義します。 終了ハンドラーは、プログラムの正常終了時 (例えば sys.exit() が呼び出されたときや、メインモジュールの実行が完了したとき)、より一般的には interp
...ジョン 3.7 で変更: サブインタープリタで使う場合、登録した関数は登録先のインタープリタに固有となりました。 atexit. register ( func , * args , ** kwargs ) func を終了ハンドラーとして登録します。 func に渡す引数があれば、 register() の引数として渡してくだ...さい。 同じ関数と引数を複数回登録することもできます。 この関数は func を返し、これをデコレータとして利用できます。 atexit. unregister ( func ) 終了ハンドラーのリストから func を削除します。 fu...nc が登録されていなければ、 unregister() は何もせず、エラーも出しません。 func が複数回登録されていた場合、 atexit の呼び出しスタックから、その関数をすべて削除します。 登録解除では内部で等価比較 ( == )... - https://man.mtool.work/python/3.14/library/atexit.html
- 共通のオブジェクト構造体 (common object structure) 10147
- 共通のオブジェクト構造体 (common object structure) Python のオブジェクト型の定義には、多数の構造体が使われます。 この節では、それらの構造体と使い方を説明します。 基本のオブジェクト型とマクロ すべての Python オブジェクトは、メモリ上の表現の先
...初期値に展開されるマクロです。 次のように展開されます。 _PyObject_EXTRA_INIT 1 , type , size , 関数とメソッドの実装 type PyCFunction 次に属します: Stable ABI . Python の呼び出し可能オブジェクトの多くを C で実装するための関数の型です。 この型の関数は 2...関数の戻り値として扱われます。 この関数は新しい参照を返さなければなりません。 関数のシグネチャは次のとおりです PyObject * PyCFunction ( PyObject * self , PyObject * args ); type PyCFunctionWithKeywords 次に属します: Stable ABI . METH_VARARGS | METH_KEY...ネチャを持つ Python の呼び出し可能オブジェクトを C で実装するための関数の型です。 シグネチャは次のとおりです。 PyObject * PyCFunctionWithKeywords ( PyObject * self , PyObject * args , PyObject * kwargs ); type PyCFunctionFast 次に属します: Stable ABI (... - https://man.mtool.work/python/3.14/c-api/structures.html
- ctypes --- Python 用の外部関数ライブラリ 10147
- ctypes --- Python 用の外部関数ライブラリ ソースコード: Lib/ctypes ctypes は Python 用の外部関数ライブラリです。 C と互換性のあるデータ型を提供し、DLL や共有ライブラリの関数を呼び出せます。 これらのライブラリを純粋な Python でラップするために
...ndle ... at ...> ロードしたdllから関数にアクセスする dll オブジェクトの属性として関数にアクセスします: >>> libc . printf <_FuncPtr object at 0x...> >>> print ( windll . kernel32 . GetModuleHandleA ) <_FuncPtr object at 0x...> >>> print ( windll . ker...nel32 . MyOwnFunction ) Traceback (most recent call last): File "<stdin>" , line 1 , in <module> File "ctypes.py" , line 239 , in __getattr_..._ func = _StdcallFuncPtr ( name , self ) AttributeError : function 'MyOwnFunction' not found >>> kernel32 や user32 などの win32... - https://man.mtool.work/python/3.14/library/ctypes.html
- Function オブジェクト 9747
- Function オブジェクト Functionオブジェクト固有の関数はわずかです。 type PyFunctionObject 関数に使われるCの構造体。 In the free-threaded build, direct access to mutable fields requires synchronization if another thread may modify the functio
...n. See C API 拡張のフリースレッド対応 . PyTypeObject PyFunction_Type PyTypeObject 型のインスタンスで、 Python の関数型を表します。これは Python プログラムに types.FunctionType として...公開されています。 int PyFunction_Check ( PyObject * o ) o が関数オブジェクト ( PyFunction_Type 型である) 場合に真を返します。パラメータは NULL にできま...せん。この関数は常に成功します。 PyObject * PyFunction_New ( PyObject * code , PyObject * globals ) 戻り値: 新しい参照。 コードオブジェクト code に関連付けられた新しい関数オ... - https://man.mtool.work/python/3.14/c-api/function.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 9441
- functools --- 高階関数と呼び出し可能オブジェクトの操作 ソースコード: Lib/functools.py functools モジュールは、ほかの関数を操作したり返したりする高階関数のためのモジュールです。 一般に、このモジュールではあらゆる呼び出し可能オブジェクトを関数
...として扱えます。 functools モジュールは次の関数を定義しています。 @ functools. cache ( user_function ) 簡単で軽量な無制限の関数キャッシュです。...されるまでに別のスレッドから呼び出された場合、ラップされた関数が複数回呼び出される可能性があります。 Added in version 3.9. @ functools. cached_property ( func ) クラスのメソッドをプロパティに変換します。 その値は一度だけ計算され、インスタンスが存続する...位だったため、ロックの競合が許容できないほど多くなる場合がありました。 Python 3.12 以降では、このロックは削除されています。 functools. cmp_to_key ( func ) 古いスタイルの比較関数を key function に変換します。key 関数を受け取るツール ( sorted() , min()... - https://man.mtool.work/python/3.14/library/functools.html
- リフレクション 9241
- リフレクション PyObject * PyEval_GetBuiltins ( void ) 戻り値: 借用参照。 次に属します: Stable ABI . バージョン 3.13 で非推奨: 代わりに PyEval_GetFrameBuiltins() を使ってください。 現在の実行フレーム内のビルトインの辞書か、もし実行中のフレー
...ければ NULL を返します。 Python コードで globals() を呼び出すことと等価です。 Added in version 3.13. const char * PyEval_GetFuncName ( PyObject * func ) 次に属します: Stable ABI . func が関数、クラス、インスタンスオブジェクトであればその名前を返し、そ...れ以外の場合は func の型の名前を返します。 For a Python function or method, the returned pointer refers to the function's name and must not be...efore detaching the thread state or executing Python code if the name may be modified concurrently. const char * PyEval_GetFuncDesc ( PyObject * func ) 次に属します: Stable ABI . func の型に応じた説明文字列を返します。 戻り値には、関数とメソッドに対す... - https://man.mtool.work/python/3.14/c-api/reflection.html
- sys.monitoring --- 実行イベントモニタリング 9241
- sys.monitoring --- 実行イベントモニタリング Added in version 3.12. 注釈 sys.monitoring は sys モジュール内の名前空間で、独立したモジュールではありません。 import sys.monitoring は ModuleNotFoundError で失敗します。 代わりに import sys を実行
...有効なイベントはありません。 コードオブジェクトごとのイベント Events can also be controlled on a per code object basis. The functions defined below which accept a types.CodeType should be prepared to accept a look-alike object from functions which are...したイベントをすべて有効にします。 コールバック関数の登録 sys.monitoring. register_callback ( tool_id : int , event : int , func : Callable | None , / ) → Callable | None 指定した tool_id の event に対して、呼び出し可能オブジェクト func を登録します。...のコールバックが登録されていれば、その登録を解除して返します。 そうでなければ register_callback() は None を返します。 引数 func を指定して 監査イベント sys.monitoring.register_callback を送出します。 sys.monitoring.register_callback(tool_id, event, N... - https://man.mtool.work/python/3.14/library/sys.monitoring.html
- 8. 複合文 (compound statement) 8934
- 8. 複合文 (compound statement) 複合文には、他の文 (のグループ) が入ります; 複合文は、中に入っている他の文の実行の制御に何らかのやり方で影響を及ぼします。一般的には、複合文は複数行にまたがって書かれますが、全部の文を一行に連ねた単純な書き方も
...) まとめると、以下のようになります: compound_stmt : if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | match_stmt | funcdef | classdef | async_with_stmt | async_for_stmt | async_funcdef suite : stmt_list NEWLINE | NEWLINE INDENT statement + DE...造的パターンマッチ: チュートリアル 8.7. 関数定義 関数定義は、ユーザ定義関数オブジェクトを定義します ( 標準型の階層 節参照): funcdef : [ decorators ] "def" funcname [ type_params ] "(" [ parameter_list ] ")" [ "->" expression ] ":" suite decorators : d...fier [ ":" expression ] star_parameter : identifier [ ":" [ "*" ] expression ] defparameter : parameter [ "=" expression ] funcname : identifier 関数定義は実行可能な文です。関数定義を実行すると、現在のローカルな名前空間内で関数名を関数オブジェクト (関... - https://man.mtool.work/python/3.14/reference/compound_stmts.html
- スレッド状態とグローバルインタープリタロック 8841
- スレッド状態とグローバルインタープリタロック CPython の フリースレッドビルド を除き、Python インタープリタは一般にスレッドセーフではありません。 マルチスレッドの Python プログラムをサポートするため、 グローバルインタープリタロック 、または
...reate a thread state, call PyThreadState_New() followed by PyThreadState_Swap() , or use the dangerous PyGILState_Ensure() function. 拡張コードからのスレッド状態のデタッチ スレッド状態 を操作する拡張コードの多くは、次の単純な構造を取ります。 // スレッ...erState_Get() from the code where the thread was created. 例えば: /* The return value of PyInterpreterState_Get() from the function that created this thread. */ PyInterpreterState * interp = thread_data -> interp ; /* Create a new thread state for th...d state, which will acquire the GIL. */ PyThreadState_Swap ( tstate ); /* Perform Python actions here. */ result = CallSomeFunction (); /* evaluate result or handle exception */ /* Destroy the thread state. No Python API allowed beyond this point. */... - https://man.mtool.work/python/3.14/c-api/threads.html