Results of 1 - 10 of about 54 for single (0.005 sec.)
- 10. 完全な文法仕様 13572
- 10. 完全な文法仕様 以下は Python の完全な文法で、CPython のパーサを生成するための文法から直接得たものです ( Grammar/python.gram を参照)。 ここでは、コード生成とエラー回復に関する詳細を省略しています。 ここで使う記法は、これまでのドキュメント
...===== # General grammatical elements and rules: # # * Strings with double quotes (") denote SOFT KEYWORDS # * Strings with single quotes (') denote KEYWORDS # * Upper case names (NAME) denote tokens in the Grammar/Tokens file # * Rule names starting wi...* ENDMARKER # GENERAL STATEMENTS # ================== statements : statement + statement : | compound_stmt | simple_stmts single_compound_stmt : | compound_stmt statement_newline : | single_compound_stmt NEWLINE | simple_stmts | NEWLINE | ENDMARKER si...ay start with 'yield'; yield_expr must start with 'yield' assignment : | NAME ':' expression [ '=' annotated_rhs ] | ( '(' single_target ')' | single_subscript_attribute_target ) ':' expression [ '=' annotated_rhs ] | ( star_targets '=' ) + annotated_r... - https://man.mtool.work/python/3.14/reference/grammar.html
- 拡張モジュールの定義 12712
- 拡張モジュールの定義 A C extension for CPython is a shared library (for example, a .so file on Linux, .pyd DLL on Windows), which is loadable into the Python process (for example, it is compiled with compatible compiler settings), and which
...f __init__() on classes. This is called multi-phase initialization to distinguish it from the legacy (but still supported) single-phase initialization scheme, where the initialization function returns a fully constructed module. See the single-phase-in...変更: 多段階初期化 ( PEP 489 ) のサポートを追加しました。 複数のモジュールインスタンス By default, extension modules are not singletons. For example, if the sys.modules entry is removed and the module is re-imported, a new module object is created, and t..._FUNC PyInit_spam ( void ) { return PyModuleDef_Init ( & spam_module ); } It is possible to export multiple modules from a single shared library by defining multiple initialization functions. However, importing them requires using symbolic links or a c... - https://man.mtool.work/python/3.14/c-api/extension-modules.html
- 超高水準レイヤ 10131
- 超高水準レイヤ この章の関数を使うとファイルまたはバッファにある Python ソースコードを実行できますが、より詳細なやり取りをインタプリタとすることはできないでしょう。 これらの関数の一部は、文法の開始記号を引数に取ります。 利用できる開始記号は
...Py_eval_input 、 Py_file_input 、 Py_single_input 、 Py_func_type_input です。 説明は、それらを引数に取る関数の後にあります。 これらの関数の一部は FILE * 引数も受け取...h the prototype char *func(FILE *stdin, FILE *stdout, const char *prompt) , overriding the default function used to read a single line of input at the interpreter's prompt. The function is expected to output the string prompt if it's not NULL , and the...ーを報告せずに次の行の入力を求めるべき場合を判断できます。 Added in version 3.11. PyCF_DONT_IMPLY_DEDENT デフォルトでは、 Py_single_input を開始記号としてコンパイルすると、ソースの末尾で未終了のインデントブロックを暗黙に閉じます。 このフラグを設定すると、... - https://man.mtool.work/python/3.14/c-api/veryhigh.html
- The Python Profilers 10131
- The Python Profilers Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how
...ef overview, and allows a user to rapidly perform profiling on an existing application. To profile a function that takes a single argument, you can do: import cProfile import re cProfile . run ( 're.compile("foo|bar")' ) (Use profile instead of cProfil...er is the total number of calls. Note that when the function does not recurse, these two values are the same, and only the single figure is printed. Instead of printing the output at the end of the profile run, you can save the results to a file by spe...成し、結果を標準出力に出力します。 The sort parameter specifies the sorting order of the displayed statistics. It accepts a single key or a tuple of keys to enable multi-level sorting, as in Stats.sort_stats . Added in version 3.13: print_stats() がキー... - https://man.mtool.work/python/3.14/library/profile.html
- code --- インタープリター基底クラス 9908
- code --- インタープリター基底クラス ソースコード: Lib/code.py code モジュールはread-eval-print (読み込み-評価-表示)ループをPythonで実装するための機能を提供します。対話的なインタプリタプロンプトを提供するアプリケーションを作るために使える二つ
...バージョン 3.13 で変更: local_exit 引数が追加されました。 code. compile_command ( source , filename = '<input>' , symbol = 'single' ) この関数はPythonのインタプリタメインループ(別名、read-eval-printループ)をエミュレートしようとするプログラムにとって役に...ame はオプションのソースが読み出されたファイル名で、デフォルトで '<input>' です。 symbol はオプションの文法の開始記号で、 'single' (デフォルト)または 'eval' か 'exec' にすべきです。 コマンドが完全で有効ならば、コードオブジェクトを返します( compile(sour...生させます。 対話的なインタプリタオブジェクト InteractiveInterpreter. runsource ( source , filename = '<input>' , symbol = 'single' ) インタプリタ内のあるソースをコンパイルし実行します。引数は compile_command() のものと同じです。 filename のデフォルトは... - https://man.mtool.work/python/3.14/library/code.html
- Unicode HOWTO 9271
- Unicode HOWTO Release : 1.12 この HOWTO 文書は、文字データの表現のための Unicode 仕様の Python におけるサポートについて論じ、さらに Unicode を使おうというときによく出喰わす多くの問題について説明します。 Unicode 入門 定義 今日のプログラムは広
...on that converts strings to one of several normal forms, where letters followed by a combining character are replaced with single characters. normalize() can be used to perform string comparisons that won't falsely report inequality if two strings use...def compare_strs ( s1 , s2 ): def NFD ( s ): return unicodedata . normalize ( 'NFD' , s ) return NFD ( s1 ) == NFD ( s2 ) single_char = 'ê' multiple_chars = ' \N{LATIN SMALL LETTER E}\N{COMBINING CIRCUMFLEX ACCENT} ' print ( 'length of first string='..., len ( single_char )) print ( 'length of second string=' , len ( multiple_chars )) print ( compare_strs ( single_char , multiple_chars )... - https://man.mtool.work/python/3.14/howto/unicode.html
- codeop --- Python コードをコンパイルする 9271
- codeop --- Python コードをコンパイルする ソースコード: Lib/codeop.py codeop モジュールは、 code モジュールが行っているように、Python の read-eval-print (読み込み・評価・表示) ループをエミュレートするための機能を提供します。 通常、このモジュ
...両方をまとめて行う手段を提供します。 前者は実行するには: codeop. compile_command ( source , filename = '<input>' , symbol = 'single' ) Pythonコードの文字列であるべき source をコンパイルしてみて、 source が有効なPythonコードの場合はコードオブジェクトを返し...リテラルがある場合は、 OverflowError または ValueError を発生させます。 symbol 引数は source が文としてコンパイルされるか( 'single' 、デフォルト) 、 文 のシーケンスとしてか ( 'exec' ) 、または 式 としてコンパイルされるかを決定します( 'eval' )。他のどんな... - https://man.mtool.work/python/3.14/library/codeop.html
- モジュールオブジェクト (module object) 8618
- モジュールオブジェクト (module object) PyTypeObject PyModule_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python のモジュール型を表します。 Python プログラムには types.ModuleType として公開されています。 int PyModule_C
...eans that the module does not support sub-interpreters, because it has global state. Negative m_size is only allowed when using legacy single-phase initialization or when creating modules dynamically . 詳細は PEP 3121 を参照。 PyMethodDef * m_methods A...duleDef_Slot * m_slots An array of slot definitions for multi-phase initialization, terminated by a {0, NULL} entry. When using legacy single-phase initialization, m_slots must be NULL . バージョン 3.5 で変更: バージョン 3.5 より前は、このメンバは常に...llowing functions may be used to create a module outside of an extension's initialization function . They are also used in single-phase initialization . PyObject * PyModule_Create ( PyModuleDef * def ) 戻り値: 新しい参照。 def の定義から、新しいモジュー... - https://man.mtool.work/python/3.14/c-api/module.html
- 6. 式 (expression) 8618
- 6. 式 (expression) この章では、Python の式における個々の要素の意味について解説します。 構文上の注意: この章以降では、 文法の表記法 を字句解析ではなく構文の記述に使います。 構文規則の (選択肢の 1 つの) 形式が次のように記述され、 name : other
...whatever that expression list yields: if the list contains at least one comma, it yields a tuple; otherwise, it yields the single expression that makes up the expression list. An empty pair of parentheses yields an empty tuple object. Since tuples are...or_test [ comp_iter ] comp_iter : comp_for | comp_if comp_if : "if" or_test [ comp_iter ] The comprehension consists of a single expression followed by at least one for clause and zero or more for or if clauses. In this case, the elements of the new c...tion, or raises a different exception, then that exception propagates to the caller. In typical use, this is called with a single exception instance similar to the way the raise keyword is used. For backwards compatibility, however, the second signatur... - https://man.mtool.work/python/3.14/reference/expressions.html
- ssl --- ソケットオブジェクト用の TLS/SSL ラッパー 7980
- ssl --- ソケットオブジェクト用の TLS/SSL ラッパー Source code: Lib/ssl.py このモジュールは、クライアント側とサーバー側の両方のネットワークソケットで Transport Layer Security (「Secure Sockets Layer」としてもよく知られています) による暗号化と
...使います。このオプションはクライアントソケットと SSLv2 のサーバソケットでは効果はありません。 Added in version 3.3. ssl. OP_SINGLE_DH_USE 異なる SSL セッションで同じ DH 鍵を再利用しないようにします。 前方秘匿性が高まりますが、より多くの計算リソースが必要...になります。 このオプションはサーバーソケットにのみ適用されます。 Added in version 3.3. ssl. OP_SINGLE_ECDH_USE 異なる SSL セッションで同じ ECDH 鍵を再利用しないようにします。 前方秘匿性が高まりますが、より多くの計算リソースが...変更: コンテキストは安全なデフォルト値で作成されます。 デフォルトでは OP_NO_COMPRESSION 、 OP_CIPHER_SERVER_PREFERENCE 、 OP_SINGLE_DH_USE 、 OP_SINGLE_ECDH_USE 、 OP_NO_SSLv2 、 OP_NO_SSLv3 ( PROTOCOL_SSLv3 の場合を除く) が設定されます。 初期の暗号スイー... - https://man.mtool.work/python/3.14/library/ssl.html