Results of 1 - 9 of about 9 for comprehension (0.010 sec.)
- 6. 式 (expression) 12708
- 6. 式 (expression) この章では、Python の式における個々の要素の意味について解説します。 構文上の注意: この章以降では、 文法の表記法 を字句解析ではなく構文の記述に使います。 構文規則の (選択肢の 1 つの) 形式が次のように記述され、 name : other
...e container contents are listed explicitly, or they are computed via a set of looping and filtering instructions, called a comprehension . Common syntax elements for comprehensions are: comprehension : assignment_expression comp_for comp_for : [ "async" ] "fo...r" target_list "in" 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...ment each time the innermost block is reached. However, aside from the iterable expression in the leftmost for clause, the comprehension is executed in a separate implicitly nested scope. This ensures that names assigned to in the target list don't "leak" int... - https://man.mtool.work/python/3.14/reference/expressions.html
- ast --- 抽象構文木 11773
- ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在
...xpr test , expr body , expr orelse ) | Dict ( expr ?* keys , expr * values ) | Set ( expr * elts ) | ListComp ( expr elt , comprehension * generators ) | SetComp ( expr elt , comprehension * generators ) | DictComp ( expr key , expr value , comprehension * ge...nerators ) | GeneratorExp ( expr elt , comprehension * generators ) -- the grammar constrains where yield expressions can occur | Await ( expr value ) | Yield ( expr ? value )...BitAnd | FloorDiv unaryop = Invert | Not | UAdd | USub cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn comprehension = ( expr target , expr iter , expr * ifs , int is_async ) excepthandler = ExceptHandler ( expr ? type , identifier ? name... - https://man.mtool.work/python/3.14/library/ast.html
- Python言語サービス 9005
- Python言語サービス PythonにはPython言語を使って作業するときに役に立つモジュールがたくさん提供されています。これらのモジュールはトークンの切り出し、パース、構文解析、バイトコードのディスアセンブリおよびその他のさまざまな機能をサポートしていま
...ast --- 抽象構文木 抽象文法 Node クラス ルートノード リテラル 変数 式 (expression) 配列要素の参照 (Subscripting) 内包表記 (Comprehension) 文 (Statements) インポート 制御フロー パターンマッチ 型アノテーション 型パラメーター 関数およびクラス定義 async と await... - https://man.mtool.work/python/3.14/library/language.html
- 用語集 8250
- 用語集 >>> 対話型 シェルにおけるデフォルトの Python プロンプトです。インタープリターで対話的に実行されるコード例でよく見られます。 ... 次のものが考えられます: 対話型 ( interactive ) シェルにおいて、インデントされたコードブロック、対応する左
...は、 __hash__() メソッドと __eq__() メソッドを持つ任意のオブジェクトを使えます。 Perl ではハッシュと呼ばれます。 dictionary comprehension (辞書内包表記) iterable 内の全てあるいは一部の要素を処理して、その結果からなる辞書を返すコンパクトな書き方です。 results =...め、名前とは異なり、連結リストよりも、ほかの言語の配列に似ています。 組み込み型の操作の時間計算量 を参照してください。 list comprehension (リスト内包表記) シーケンス中の全てあるいは一部の要素を処理して、その結果からなるリストを返す、コンパクトな方法です。 resu...gister() で明示的に登録できます。 シーケンスのメソッド全般について詳しくは、 共通のシーケンス演算 を参照してください。 set comprehension (集合内包表記) イテラブルのすべて、または一部の要素を処理し、その結果からなる集合を返す簡潔な書き方です。 results = {c for... - https://man.mtool.work/python/3.14/glossary.html
- 5. データ構造 7944
- 5. データ構造 この章では、すでに学んだことについてより詳しく説明するとともに、いくつか新しいことを追加します。 5.1. リスト型についてもう少し list 型には、他にもいくつかメソッドがあります。リストオブジェクトのすべてのメソッドを以下に示します
...)] File "<stdin>" , line 1 [ x , x ** 2 for x in range ( 6 )] ^^^^^^^ SyntaxError : did you forget parentheses around the comprehension target? >>> # 2つの 'for' を持つリスト内包表記でリストをフラットにする >>> vec = [[ 1 , 2 , 3 ], [ 4 , 5 , 6 ], [ 7 , 8 ,...方に存在する文字 {'a', 'c'} >>> a ^ b # aまたはbにあるが、両方にはない文字 {'r', 'd', 'b', 'm', 'z', 'l'} Similarly to list comprehensions , set comprehensions are also supported: >>> a = { x for x in 'abracadabra' if x not in 'abc' } >>> a {'r', 'd'} 5.5. 辞書... - https://man.mtool.work/python/3.14/tutorial/datastructures.html
- プログラミング FAQ 7783
- プログラミング FAQ 一般的な質問 ブレークポイントやステップ実行ができる、ソースコードレベルのデバッガはありますか? はい。 Python 用のデバッガについては次に解説してあり、組み込みの breakpoint() 関数でそれらのデバッガに処理を移せます。 pdb モジ
...トのシーケンスにメソッドや関数を適用するにはどうしますか? メソッドや関数を呼び出し、その戻り値をリストにまとめるには、 list comprehension を使うと簡潔に書けます。 result = [ obj . method () for obj in mylist ] result = [ function ( obj ) for obj in mylist ] 戻... - https://man.mtool.work/python/3.14/faq/programming.html
- What's New In Python 3.10 7783
- What's New In Python 3.10 編集者 : Pablo Galindo Salgado この記事では Python 3.9 と比較した Python 3.10 の新機能を解説します。Python 3.10 は2021年10月4日にリリースされました。全詳細については 変更履歴 をご覧ください。 概要 -- リリースハイラ
...ile "<stdin>" , line 1 { x , y for x , y in zip ( 'abcd' , '1234' )} ^ SyntaxError : did you forget parentheses around the comprehension target? (Pablo Galindo の貢献による bpo-43017 ) コレクションリテラルや式の間のカンマが存在しない: >>> items = { ... x : 1... - https://man.mtool.work/python/3.14/whatsnew/3.10.html
- What's New In Python 3.11 7783
- What's New In Python 3.11 編集者 : Pablo Galindo Salgado この記事では Python 3.10 と比較した Python 3.11 の新機能を解説します。Python 3.11 は2022年10月24日にリリースされました。全詳細については 変更履歴 をご覧ください。 概要 -- リリースハイ
...Stefan Behnel による gh-68264 での貢献。) よくある場合のリストのサイズ変更を効率化し、 list.append() が約 15%、単純な list comprehension が最大 20~30% 高速になりました。 (Dennis Sweeney による gh-91165 での貢献。) キーがすべて Unicode オブジェクトである辞書は... - https://man.mtool.work/python/3.14/whatsnew/3.11.html
- 変更履歴 7783
- 変更履歴 次の Python バージョン リリース日: XXXX-XX-XX セキュリティ gh-160499 : Fix unbounded memory growth in asyncio TLS connections when a peer stops reading but keeps sending records that make OpenSSL generate its own replies (such as T
...Fix symtable.Symbol.is_referenced() for local and nonlocal symbols in function scopes when their only uses are in inlined comprehensions. gh-159739 : Fix a crash when a ctypes structure subclass cannot be created due to an allocation failure. gh-159739 : Fix..., which caused unexpected REPL exit and IDLE Shell restart. gh-152373 : Fix the pdb until command not stepping over a list comprehension when a breakpoint is set on it. Patch by tonghuaroot. gh-133998 : ストリーミング書き込みモード ( w|gz ) の tarfile.open()... - https://man.mtool.work/python/3.14/whatsnew/changelog.html
PREV
1
NEXT