per page, with , order by , clip by
Results of 1 - 10 of about 22 for Ensure (0.005 sec.)
スレッド状態とグローバルインタープリタロック 14831
スレッド状態とグローバルインタープリタロック CPython の フリースレッドビルド を除き、Python インタープリタは一般にスレッドセーフではありません。 マルチスレッドの Python プログラムをサポートするため、 グローバルインタープリタロック 、または ... need to create a thread state, call PyThreadState_New() followed by PyThreadState_Swap() , or use the dangerous PyGILState_Ensure() function. 拡張コードからのスレッド状態のデタッチ スレッド状態 を操作する拡張コードの多くは、次の単純な構造を取ります。 / ... be a dangling pointer! Legacy API Another common pattern to call Python code from a non-Python thread is to use PyGILState_Ensure() followed by a call to PyGILState_Release() . These functions do not work well when multiple interpreters exist in the Py ... thon interpreter has ever been used in the current thread (which is common for threads created outside Python), PyGILState_Ensure will create and attach a thread state for the "main" interpreter (the first interpreter in the Python process). Additional ...
https://man.mtool.work/python/3.14/c-api/threads.html
json --- JSON エンコーダーとデコーダー 11413
json --- JSON エンコーダーとデコーダー ソースコード: Lib/json/__init__.py JSON (JavaScript Object Notation) は、 RFC 7159 ( RFC 4627 を obsolete) と ECMA-404 によって定義された軽量のデータ交換用のフォーマットです。 JavaScript のオブジェクト ... います。根底のコンテナに順序がない場合のみ、順序が失われます。 基本的な使い方 json. dump ( obj , fp , * , skipkeys = False , ensure_ascii = True , check_circular = True , allow_nan = True , cls = None , indent = None , separators = None , default = None ... 本型 ( str 、 int 、 float 、 bool 、 None ) 以外のキーは、 TypeError を送出せずにスキップします。 デフォルトは False です。 ensure_ascii ( bool ) -- True (デフォルト) の場合、入力に含まれる非 ASCII 文字と表示不可能な文字はすべてエスケープして出力されます ... バージョン 3.6 で変更: すべてのオプション引数は、 キーワード専用 になりました。 json. dumps ( obj , * , skipkeys = False , ensure_ascii = True , check_circular = True , allow_nan = True , cls = None , indent = None , separators = None , default = None ...
https://man.mtool.work/python/3.14/library/json.html
C API 拡張のフリースレッド対応 9056
C API 拡張のフリースレッド対応 CPython 3.13 から、 global interpreter lock (GIL) を無効にして実行する free threading という構成がサポートされています。 このドキュメントでは、C API を使う拡張をフリースレッドに対応させる方法を説明します。 C か ... レッド状態と GIL の API Python は、スレッド状態と GIL を管理するために、次のような関数やマクロを提供しています。 PyGILState_Ensure() と PyGILState_Release() PyEval_SaveThread() と PyEval_RestoreThread() Py_BEGIN_ALLOW_THREADS と Py_END_ALLOW_THREADS The ... hread state even when the GIL is disabled. For example, if you create a thread outside of Python, you must call PyGILState_Ensure() before calling into the Python API to ensure that the thread has a valid Python thread state. I/O やロック取得などのブロ ...
https://man.mtool.work/python/3.14/howto/free-threading-extensions.html
optparse --- コマンドラインオプションのパーサー 9056
optparse --- コマンドラインオプションのパーサー ソースコード: Lib/optparse.py 引数解析ライブラリの選択 標準ライブラリには、引数を解析するライブラリが三つあります。 getopt : C の手続き型の getopt API に忠実に対応するモジュールです。 optparse ... ( self , action , dest , opt , value , values , parser ): if action == "extend" : lvalue = value . split ( "," ) values . ensure_value ( dest , []) . extend ( lvalue ) else : Option . take_action ( self , action , dest , opt , value , values , parser ... については Option.take_action() に処理を渡します。 values は optparse_parser.Values クラスのインスタンスであり、非常に有用な ensure_value() メソッドを提供しています。 ensure_value() は本質的に安全弁付きの getattr() です。次のように呼び出します values . e ... nsure_value ( attr , value ) values に attr 属性が無いか None だった場合に、 ensure_value() は最初に value をセットし、それから value を返します。この振る舞いは "extend" , "append" , "count" のように、データ ...
https://man.mtool.work/python/3.14/library/optparse.html
C API Stability 8888
C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修 ... odule.abi3.so ). It does not check if such extensions conform to a Stable ABI. The user (or their packaging tools) need to ensure that, for example, extensions built with the 3.10+ Limited API are not installed for lower versions of Python. All functio ... ally depend on the OS type and processor architecture It is the responsibility of each particular distributor of Python to ensure that all Python versions on a particular platform are built in a way that does not break the Stable ABI. This is the case ... GetLineNumber() PyFrozenSet_New() PyFrozenSet_Type PyGC_Collect() PyGC_Disable() PyGC_Enable() PyGC_IsEnabled() PyGILState_Ensure() PyGILState_GetThisThreadState() PyGILState_Release() PyGILState_STATE PyGetSetDef PyGetSetDescr_Type PyImport_AddModule( ...
https://man.mtool.work/python/3.14/c-api/stable.html
Future 8888
Future ソースコード: Lib/asyncio/futures.py , Lib/asyncio/base_futures.py Future オブジェクトは 低水準のコールバックベースのコード と高水準の async/await コードとの間を橋渡しします。 Future の関数 asyncio. isfuture ( obj ) オブジェクト obj ... cio.Task クラスのインスタンス _asyncio_future_blocking 属性を持った Future 的なオブジェクト Added in version 3.5. asyncio. ensure_future ( obj , * , loop = None ) 下記のいずれかを返します: obj が Future オブジェクト、 Task オブジェクト、または Future 的 ... がコルーチンである ( iscoroutine() 関数を使って検査します) 場合には obj をラップした Task オブジェクト; この場合コルーチンは ensure_future() によりスケジュールされます。 引数 obj が awaitable である ( inspect.isawaitable() 関数を使って検査します) 場合には ...
https://man.mtool.work/python/3.14/library/asyncio-future.html
venv --- 仮想環境の作成 8703
venv --- 仮想環境の作成 Added in version 3.3. ソースコード: Lib/venv/ venv モジュールは、軽量な「仮想環境」の作成に対応しています。 各仮想環境は、それぞれの site ディレクトリに独立した Python パッケージ群を持ちます。 仮想環境は、インストール ... なら true で、そうでなければ false です。 --without-pip オプションを指定しない限り、仮想環境に pip をインストールするために ensurepip が呼び出されます。 venv には複数のパスを渡すことができ、その場合はそれぞれのパスに同一の仮想環境が作成されます。 仮想環 ... です。 with_pip -- 真偽値で、真の場合仮想環境に pip がインストールされていることを保証します。 --default-pip オプションで ensurepip を使用します。 prompt -- 仮想環境がアクティベートされたときに使う文字列(デフォルトは None のため、仮想環境のディレクト ... 想環境を作成する。 env_dir は環境を作成する対象ディレクトリ。 """ env_dir = os . path . abspath ( env_dir ) context = self . ensure_directories ( env_dir ) self . create_configuration ( context ) self . setup_python ( context ) self . setup_scripts ( con ...
https://man.mtool.work/python/3.14/library/venv.html
What's New In Python 3.5 8518
What's New In Python 3.5 エディタ : Elvis Pranskevichus < elvis @ magic . io >, Yury Selivanov < yury @ magic . io > この記事では 3.4 と比較した Python 3.5 の新機能を解説します。 Python 3.5 は2015年9月13日にリリースされました。 全詳細につい ... 制御の 上限 と 下限 のしきい値を調べられます。 (Contributed by Victor Stinner.) async() 関数は非推奨になりました。 代わりに ensure_future() を使ってください。 (Contributed by Yury Selivanov.) loop.create_task() メソッドが使うタスクファクトリーをカスタマ ... inner.) JoinableQueue クラスは asyncio.Queue クラスにより削除されました。 (Contributed by Victor Stinner.) 3.5.1 での変更: ensure_future() 関数と、 loop.run_until_complete() のようなそれを使っている全ての関数であらゆる awaitable オブジェクト を受け取れ ... 規表現のパースが最高で 10% 速くなりました。 (Contributed by Serhiy Storchaka in bpo-19380 .) json.dumps() 関数が最適化され、 ensure_ascii=False の場合も ensure_ascii=True と同じ速さで実行できるようになりました。 (Contributed by Naoki Inada in bpo-23206 . ...
https://man.mtool.work/python/3.14/whatsnew/3.5.html
Python プロセス内の複数のインタープリタ 7811
Python プロセス内の複数のインタープリタ ほとんどの場合は埋め込む Python インタプリタは1つだけですが、いくつかの場合に同一プロセス内、あるいは同一スレッド内で、複数の独立したインタプリタを作成する必要があります。 これを可能にするのがサブイン ... スレッドが1対1で対応していることを前提にしていて、サブインタプリタが存在するとその前提が崩れるからです。対応する PyGILState_Ensure() と PyGILState_Release() の呼び出しのペアの間では、サブインタプリタの切り替えを行わないことを強く推奨します。さらに、( ct ...
https://man.mtool.work/python/3.14/c-api/subinterpreters.html
A Conceptual Overview of asyncio 7811
A Conceptual Overview of asyncio この HOWTO では、 asyncio の基本的な仕組みをしっかり理解できるように説明します。 推奨される書き方がどのように動き、なぜ推奨されるのかを理解する助けになるでしょう。 asyncio の主要な概念について、疑問を持ってい ... of scope and may be subject to garbage collection. In practice, asyncio and Python's garbage collector work pretty hard to ensure this sort of thing doesn't happen. But that's no reason to be reckless! await await は Python のキーワードで、一般に次の 2 ...
https://man.mtool.work/python/3.14/howto/a-conceptual-overview-of-asyncio.html
PREV 1 2 3 NEXT