Results of 1 - 10 of about 50 for nonlocal (0.007 sec.)
- 7. 単純文 (simple statement) — Python 3.14.8 ドキュメント 13385
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 7. 単純文 (simple statement) テーマ 自動 ライト ダーク | 7. 単純文 (simple statement) ¶ 単純文とは、単一の論理行内に収められる文です。単
...del_stmt | return_stmt | yield_stmt | raise_stmt | break_stmt | continue_stmt | import_stmt | future_stmt | global_stmt | nonlocal_stmt | type_stmt 7.1. 式文 (expression statement) ¶ 式文は、(主に対話的な使い方では) 値を計算して出力するために使ったり、(...入は、以下のようにして再帰的に定義されています。 ターゲットが識別子 (名前) の場合: 名前が現在のコードブロック内の global や nonlocal 文に書かれていないければ: 名前は現在のローカル名前空間内のオブジェクトに束縛されます。 そうでなければ: 名前はそれぞれグロー...バル名前空間内か、 nonlocal で決められた外側の名前空間内のオブジェクトに束縛されます。 名前がすでに束縛済みの場合、再束縛 (rebind) がおこなわれます。再... - https://man.mtool.work/python/3.14/reference/simple_stmts.html
- 7. 単純文 (simple statement) — Python 3.14.8 ドキュメント 13385
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 7. 単純文 (simple statement) テーマ 自動 ライト ダーク | 7. 単純文 (simple statement) ¶ 単純文とは、単一の論理行内に収められる文です。単
...del_stmt | return_stmt | yield_stmt | raise_stmt | break_stmt | continue_stmt | import_stmt | future_stmt | global_stmt | nonlocal_stmt | type_stmt 7.1. 式文 (expression statement) ¶ 式文は、(主に対話的な使い方では) 値を計算して出力するために使ったり、(...入は、以下のようにして再帰的に定義されています。 ターゲットが識別子 (名前) の場合: 名前が現在のコードブロック内の global や nonlocal 文に書かれていないければ: 名前は現在のローカル名前空間内のオブジェクトに束縛されます。 そうでなければ: 名前はそれぞれグロー...バル名前空間内か、 nonlocal で決められた外側の名前空間内のオブジェクトに束縛されます。 名前がすでに束縛済みの場合、再束縛 (rebind) がおこなわれます。再... - https://man.mtool.work/python/3.14/reference/simple_stmts.html
- 9. クラス — Python 3.14.8 ドキュメント 11144
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 9. クラス テーマ 自動 ライト ダーク | 9. クラス ¶ クラスはデータと機能を組み合わせる方法を提供します。 新規にクラスを作成することで、新し
...ールのグローバルな名前の入った最後から2番目のスコープに対して直接行われます。最内スコープの外側にある変数に再束縛するには、 nonlocal 文が使えます。nonlocal と宣言されなかった変数は、全て読み出し専用となります (そのような変数に対する書き込みは、単に 新しい...で、動的な名前解決に頼ってはいけません! (事実、ローカルな変数は既に静的に決定されています。) Python の特徴として、 global や nonlocal 文が有効でない場合は、名前に対する参照は常に最も内側のスコープに対して有効になります。 代入はデータをコピーしません。オブジ...コープの名前に拘束します。 global 文を使うと、特定の変数がグローバルスコープに存在し、そこで再束縛されることを指示できます。 nonlocal 文は、特定の変数が外側のスコープに存在し、そこで再束縛されることを指示します。 9.2.1. スコープと名前空間の例 ¶ 異なるスコー... - https://man.mtool.work/python/3.14/tutorial/classes.html
- 9. クラス — Python 3.14.8 ドキュメント 11144
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 9. クラス テーマ 自動 ライト ダーク | 9. クラス ¶ クラスはデータと機能を組み合わせる方法を提供します。 新規にクラスを作成することで、新し
...ールのグローバルな名前の入った最後から2番目のスコープに対して直接行われます。最内スコープの外側にある変数に再束縛するには、 nonlocal 文が使えます。nonlocal と宣言されなかった変数は、全て読み出し専用となります (そのような変数に対する書き込みは、単に 新しい...で、動的な名前解決に頼ってはいけません! (事実、ローカルな変数は既に静的に決定されています。) Python の特徴として、 global や nonlocal 文が有効でない場合は、名前に対する参照は常に最も内側のスコープに対して有効になります。 代入はデータをコピーしません。オブジ...コープの名前に拘束します。 global 文を使うと、特定の変数がグローバルスコープに存在し、そこで再束縛されることを指示できます。 nonlocal 文は、特定の変数が外側のスコープに存在し、そこで再束縛されることを指示します。 9.2.1. スコープと名前空間の例 ¶ 異なるスコー... - https://man.mtool.work/python/3.14/tutorial/classes.html
- 4. 実行モデル — Python 3.14.8 ドキュメント 8301
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 4. 実行モデル テーマ 自動 ライト ダーク | 4. 実行モデル ¶ 4.1. プログラムの構造 ¶ Python プログラムはコードブロックから構成されます。 ブ
...ルのコードブロック) 内で起こります。 If a name is bound in a block, it is a local variable of that block, unless declared as nonlocal or global . If a name is bound at the module level, it is a global variable. (The variables of the module code block are l...と同じスコープを持ちます。ある自由変数の最内スコープに global 文がある場合、その自由変数はグローバル変数とみなされます。 The nonlocal statement causes corresponding names to refer to previously bound variables in the nearest enclosing function scope. Synta...compile time if the given name does not exist in any enclosing function scope. Type parameters cannot be rebound with the nonlocal statement. あるモジュールの名前空間は、そのモジュールが最初に import された時に自動的に作成されます。スクリプトの主モジュー... - https://man.mtool.work/python/3.14/reference/executionmodel.html
- 4. 実行モデル — Python 3.14.8 ドキュメント 8301
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 4. 実行モデル テーマ 自動 ライト ダーク | 4. 実行モデル ¶ 4.1. プログラムの構造 ¶ Python プログラムはコードブロックから構成されます。 ブ
...ルのコードブロック) 内で起こります。 If a name is bound in a block, it is a local variable of that block, unless declared as nonlocal or global . If a name is bound at the module level, it is a global variable. (The variables of the module code block are l...と同じスコープを持ちます。ある自由変数の最内スコープに global 文がある場合、その自由変数はグローバル変数とみなされます。 The nonlocal statement causes corresponding names to refer to previously bound variables in the nearest enclosing function scope. Synta...compile time if the given name does not exist in any enclosing function scope. Type parameters cannot be rebound with the nonlocal statement. あるモジュールの名前空間は、そのモジュールが最初に import された時に自動的に作成されます。スクリプトの主モジュー... - https://man.mtool.work/python/3.14/reference/executionmodel.html
- 10. 完全な文法仕様 — Python 3.14.8 ドキュメント 8001
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 10. 完全な文法仕様 テーマ 自動 ライト ダーク | 10. 完全な文法仕様 ¶ 以下に示すのは Python の完全な文法です。CPython のパーサを生成するた
...| import_stmt | raise_stmt | pass_stmt | del_stmt | yield_stmt | assert_stmt | break_stmt | continue_stmt | global_stmt | nonlocal_stmt compound_stmt : | function_def | if_stmt | class_def | with_stmt | for_stmt | try_stmt | while_stmt | match_stmt # SI...n ] | 'raise' pass_stmt : | 'pass' break_stmt : | 'break' continue_stmt : | 'continue' global_stmt : 'global' ',' . NAME + nonlocal_stmt : 'nonlocal' ',' . NAME + del_stmt : | 'del' del_targets & ( ';' | NEWLINE ) yield_stmt : yield_expr assert_stmt : 'a... - https://man.mtool.work/python/3.14/reference/grammar.html
- 10. 完全な文法仕様 — Python 3.14.8 ドキュメント 8001
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 10. 完全な文法仕様 テーマ 自動 ライト ダーク | 10. 完全な文法仕様 ¶ 以下に示すのは Python の完全な文法です。CPython のパーサを生成するた
...| import_stmt | raise_stmt | pass_stmt | del_stmt | yield_stmt | assert_stmt | break_stmt | continue_stmt | global_stmt | nonlocal_stmt compound_stmt : | function_def | if_stmt | class_def | with_stmt | for_stmt | try_stmt | while_stmt | match_stmt # SI...n ] | 'raise' pass_stmt : | 'pass' break_stmt : | 'break' continue_stmt : | 'continue' global_stmt : 'global' ',' . NAME + nonlocal_stmt : 'nonlocal' ',' . NAME + del_stmt : | 'del' del_targets & ( ';' | NEWLINE ) yield_stmt : yield_expr assert_stmt : 'a... - https://man.mtool.work/python/3.14/reference/grammar.html
- 索引 — Python 3.14.8 ドキュメント 7700
- ナビゲーション 索引 モジュール | Python » 3.14.8 Documentation » 索引 テーマ 自動 ライト ダーク | Index – N N (tkinter モジュール) N_TOKENS (token モジュール) n_waiting (asyncio.Barrier の属性) (threading.Barrier の属性) NAK (curses.ascii モ
...NONE (tkinter モジュール) None (組み込みオブジェクト) (組み込み変数) NoneType (types のクラス) nonl() (curses モジュール) nonlocal statement Nonlocal (ast のクラス) nonmember() (enum モジュール) noop() (imaplib.IMAP4 のメソッド) (poplib.POP3 のメソッド)... - https://man.mtool.work/python/3.14/genindex-N.html
- ast --- Abstract syntax trees — Python 3.14.8 ドキュメント 7700
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python言語サービス » ast --- Abstract syntax trees テーマ 自動 ライト ダーク | ast --- Abstract syntax trees ¶ ソースコード: Lib/as
...ort ( alias * names ) | ImportFrom ( identifier ? module , alias * names , int ? level ) | Global ( identifier * names ) | Nonlocal ( identifier * names ) | Expr ( expr value ) | Pass | Break | Continue -- col_offset is the byte offset in the utf8 string...t = 4 )) Module( body=[ Expr( value=YieldFrom( value=Name(id='x', ctx=Load())))]) class ast. Global ( names ) ¶ class ast. Nonlocal ( names ) ¶ global および nonlocal 文です。 names は生の文字列のリストです。 >>> print ( ast . dump ( ast . parse ( 'globa...l x,y,z' ), indent = 4 )) Module( body=[ Global( names=[ 'x', 'y', 'z'])]) >>> print ( ast . dump ( ast . parse ( 'nonlocal x,y,z' ), indent = 4 )) Module( body=[ Nonlocal( names=[ 'x', 'y', 'z'])]) class ast. ClassDef ( name , bases , keywords ,... - https://man.mtool.work/python/3.14/library/ast.html