per page, with , order by , clip by
Results of 1 - 10 of about 14 for catch (0.008 sec.)
warnings --- 警告の制御 14686
warnings --- 警告の制御 ソースコード: Lib/warnings.py 警告メッセージは一般に、ユーザに警告しておいた方がよいような状況下にプログラムが置かれているが、その状況は (通常は) 例外を送出したりそのプログラムを終了させるほどの正当な理由がないといっ ... 一時的に警告を抑制する 非推奨の関数など、警告を発することが分かっているコードを使う際に、その警告を表示したくない場合は、 catch_warnings コンテキストマネージャーで抑制できます。 コマンドラインで警告が明示的に設定されていても抑制できます。 import warn ... ings def fxn (): warnings . warn ( "deprecated" , DeprecationWarning ) with warnings . catch_warnings (): warnings . simplefilter ( "ignore" ) fxn () このコンテキストマネージャー内では、すべての警告が無視されます。 ... ることを認識していないかもしれない、他のコードに対する警告は抑制しません。 注釈 複数のスレッドや非同期関数を使うプログラムで catch_warnings コンテキストマネージャーを使う際の、並行処理の安全性については コンテキストマネージャーの並行処理の安全性 を参照し ...
https://man.mtool.work/python/3.14/library/warnings.html
test --- Python の回帰テストパッケージ 9837
test --- Python の回帰テストパッケージ 注釈 test パッケージは Python 内部での使用のみを目的としています。 このドキュメントは Python のコア開発者向けに用意されています。 ここで説明するコードは Python のリリース間で予告なく変更または削除される ... attribute ( obj , name ) 属性を取得します。 AttributeError が発生した場合は unittest.SkipTest を送出します。 test.support. catch_unraisable_exception ( ) sys.unraisablehook() を使い、送出できない例外を捕捉するコンテキストマネージャです。 例外の値 ( cm ... トを復活させる可能性があります。 コンテキストマネージャの終了時に、保存したオブジェクトを消去します。 使い方: with support . catch_unraisable_exception () as cm : # 「送出できない例外」を発生させるコード ... # cm.unraisable を使って送出できない例外を調べ ... None ) with 文内で作成されたすべてのスレッドが終了するまで待つコンテキストマネージャです。 test.support.threading_helper. catch_threading_exception ( ) threading.excepthook() を使って threading.Thread の例外を捕捉するコンテキストマネージャです。 例外 ...
https://man.mtool.work/python/3.14/library/test.html
例外 9137
例外 ソースコード: Lib/asyncio/exceptions.py exception asyncio. TimeoutError 操作が指定された期限を超えたときに送出される、非推奨な TimeoutError のエイリアス。 バージョン 3.11 で変更: このクラスは TimeoutError のエイリアスになりました。 exc ... ページ PHP language.error-handling.throwable PHP set_exception_handler() PHP parallel-future.done PHP control-structures.try-catch PHP parallel-future.cancelled PHP stream.setup ...
https://man.mtool.work/python/3.14/library/asyncio-exceptions.html
Python のフリースレッド対応 8787
Python のフリースレッド対応 CPython 3.13 から、 global interpreter lock (GIL) を無効にした free threading という Python のビルドがサポートされています。 フリースレッド実行では、利用可能な CPU コアでスレッドを並列に動かし、処理能力を十分に活 ... xt_aware_warnings フラグはデフォルトで真です。 デフォルトの GIL が有効なビルドでは、偽になっています。 真の場合、 warnings.catch_warnings コンテキストマネージャは、警告フィルタにコンテキスト変数を使います。 偽の場合、 catch_warnings はグローバルなフィ ...
https://man.mtool.work/python/3.14/howto/free-threading-python.html
タイマーファイル記述子 HOWTO 8454
タイマーファイル記述子 HOWTO リリース : 1.13 この HOWTO では、Linux のタイマーファイル記述子を Python で使う方法を説明します。 使用例 次の例は、タイマーファイル記述子を使って 1 秒に 2 回関数を実行する方法を示します。 # 実用的なスクリプトでは ... : # Check if there is data to read. print ( f "Reading data { fd } " ) data = conn . recv ( 1024 ) if data : # You should catch UnicodeDecodeError exception for safety. cmd = data . decode () if cmd . startswith ( "stop" ): print ( f "Stopping server ...
https://man.mtool.work/python/3.14/howto/timerfd.html
unittest --- ユニットテストフレームワーク 8279
unittest --- ユニットテストフレームワーク ソースコード: Lib/unittest/__init__.py (すでにテストの基本概念について詳しいようでしたら、この部分をとばして アサートメソッド一覧 に進むと良いでしょう。) unittest ユニットテストフレームワークは、もと ... る間は結果の出力は破棄されます。テストの失敗やエラーの場合、出力は通常通り表示され、エラーメッセージに追加されます。 -c , --catch Control - C を実行中のテストが終了するまで遅延させ、そこまでの結果を出力します。二回目の Control - C は、通常通り Keyboard ... lso passed to assertWarns() . The test passes if warning is triggered and fails if it isn't. Any exception is an error. To catch any of a group of warnings, a tuple containing the warning classes may be passed as warning . warning 引数のみ(またはそれ ... rgv = None , testRunner = None , testLoader = unittest.defaultTestLoader , exit = True , verbosity = 1 , failfast = None , catchbreak = None , buffer = None , warnings = None ) module から複数のテストを読み込んで実行するためのコマンドラインプログラム。 ...
https://man.mtool.work/python/3.14/library/unittest.html
6. 式 (expression) 8104
6. 式 (expression) この章では、Python の式における個々の要素の意味について解説します。 構文上の注意: この章以降では、 文法の表記法 を字句解析ではなく構文の記述に使います。 構文規則の (選択肢の 1 つの) 形式が次のように記述され、 name : other ... he generator exits without yielding another value, a StopIteration exception is raised. If the generator function does not catch the passed-in exception, or raises a different exception, then that exception propagates to the caller. In typical use, th ... eneratorExit) ). The exception is raised by the yield expression where the generator was paused. If the generator function catches the exception and returns a value, this value is returned from close() . If the generator function is already closed, or ... raises GeneratorExit (by not catching the exception), close() returns None . If the generator yields a value, a RuntimeError is raised. If the generator rais ...
https://man.mtool.work/python/3.14/reference/expressions.html
1. コマンドラインと環境 8104
1. コマンドラインと環境 CPython インタプリタはコマンドラインと環境を読み取って様々な設定を行ないます。 ほかの実装では、コマンドラインの形式が異なる場合があります。 関連情報は 別のPythonの実装 を参照してください。 1.1. コマンドライン Python ... AD_INHERIT_CONTEXT も参照してください。 Added in version 3.14. -X context_aware_warnings= 0,1 を 1 に設定すると、 warnings.catch_warnings コンテキストマネージャは、警告フィルタの状態の保存に ContextVar を使います。 未設定の場合、このオプションのデフォ ... thread_inherit_context も参照してください。 Added in version 3.14. PYTHON_CONTEXT_AWARE_WARNINGS 1 を設定すると、 warnings.catch_warnings コンテキストマネージャは、警告フィルタの状態の保存に ContextVar を使います。 未設定の場合、この変数のデフォルト値 ...
https://man.mtool.work/python/3.14/using/cmdline.html
What's new in Python 3.14 8104
What's new in Python 3.14 エディタ : Adam Turner と Hugo van Kemenade この記事では Python 3.13 と比較した Python 3.14 の新機能を解説します。Python 3.14 は2025年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP ... py of the Context() of the caller of start() . Most significantly, this makes the warning filtering context established by catch_warnings be "inherited" by threads (or asyncio tasks) started within that context. It also affects other modules that use ... o、Łukasz Langa、Yury Selivanov、Marta Gomez Macias が gh-91048 で貢献しました。) 並行処理で安全に使える警告の制御 warnings.catch_warnings コンテキストマネージャは、警告フィルタにコンテキスト変数を使うよう選択できるようになりました。 -X コマンドラインオ ... ションまたは環境変数で context_aware_warnings フラグを設定すると有効になります。 これにより、複数のスレッドや非同期タスクで catch_warnings を使う場合も、予測可能な形で警告を制御できます。 フラグのデフォルト値は、フリースレッドビルドでは真、GIL が有効な ...
https://man.mtool.work/python/3.14/whatsnew/3.14.html
Unicode HOWTO 7929
Unicode HOWTO Release : 1.12 この HOWTO 文書は、文字データの表現のための Unicode 仕様の Python におけるサポートについて論じ、さらに Unicode を使おうというときによく出喰わす多くの問題について説明します。 Unicode 入門 定義 今日のプログラムは広 ... モリに保持する必要があるため、より多くのメモリが必要です。) The solution would be to use the low-level decoding interface to catch the case of partial coding sequences. The work of implementing this has already been done for you: the built-in open() fun ...
https://man.mtool.work/python/3.14/howto/unicode.html
PREV 1 2 NEXT