Python ランタイムサービス
*************************

この章では、Python インタープリタや Python 環境に深く関連する各種の機
能を解説します。以下に一覧を示します:

* "sys" --- System-specific parameters and functions

* "sysconfig" --- Provide access to Python's configuration information

  * 構成変数

  * インストールパス

  * User scheme

    * "posix_user"

    * "nt_user"

    * "osx_framework_user"

  * Home scheme

    * "posix_home"

  * Prefix scheme

    * "posix_prefix"

    * "nt"

  * Installation path functions

  * その他の関数

  * "sysconfig" をスクリプトとして使う

* "builtins" --- Built-in objects

* "__main__" --- Top-level code environment

  * "__name__ == '__main__'"

    * 「トップレベルのスクリプト環境」とは

    * 通常の使われ方

    * パッケージングで考慮すべき点

  * "__main__.py" in Python Packages

    * 通常の使われ方

  * "import __main__"

* "warnings" --- Warning control

  * 警告カテゴリ

  * 警告フィルタ

    * Describing Warning Filters

    * デフォルトの警告フィルタ

    * Overriding the default filter

  * 一時的に警告を抑制する

  * 警告のテスト

  * Updating Code For New Versions of Dependencies

  * 利用可能な関数

  * 利用可能なコンテキストマネージャー

* "dataclasses" --- データクラス

  * モジュールの内容

  * 初期化後の処理

  * クラス変数

  * 初期化限定変数

  * 凍結されたインスタンス

  * 継承

  * Re-ordering of keyword-only parameters in "__init__()"

  * デフォルトファクトリ関数

  * 可変なデフォルト値

  * Descriptor-typed fields

* "contextlib" --- "with" 文コンテキスト用ユーティリティ

  * ユーティリティ

  * 例とレシピ

    * 可変数個のコンテキストマネージャーをサポートする

    * "__enter__" メソッドからの例外をキャッチする

    * "__enter__" 実装内のクリーンアップ

    * "try-finally" + flag 変数パターンを置き換える

    * コンテキストマネージャーを関数デコレーターとして使う

  * 単回使用、再利用可能、およびリエントラントなコンテキストマネージャ

    * リエントラントなコンテキストマネージャ

    * 再利用可能なコンテキストマネージャ

* "abc" --- Abstract Base Classes

* "atexit" --- Exit handlers

  * "atexit" の例

* "traceback" --- Print or retrieve a stack traceback

  * "TracebackException" オブジェクト

  * "StackSummary" オブジェクト

  * "FrameSummary" オブジェクト

  * トレースバックの例

* "__future__" --- Future statement definitions

  * モジュールコンテンツ

* "gc" --- Garbage Collector interface

* "inspect" --- Inspect live objects

  * 型とメンバー

  * ソースコードの情報取得

  * Signature オブジェクトで呼び出し可能オブジェクトを内省する

  * クラスと関数

  * インタープリタスタック

  * 属性の静的なフェッチ

  * Current State of Generators and Coroutines

  * Code Objects Bit Flags

  * コマンドラインインターフェイス

* "site" --- Site-specific configuration hook

  * "sitecustomize"

  * "usercustomize"

  * readline の設定

  * モジュールの内容

  * コマンドラインインターフェイス
