per page, with , order by , clip by
Results of 1 - 10 of about 21 for elements (0.007 sec.)
xml.etree.ElementTree --- ElementTree XML API 12346
xml.etree.ElementTree --- ElementTree XML API Source code: Lib/xml/etree/ElementTree.py xml.etree.ElementTree モジュールは、XML データの解析と作成を行うシンプルで効率的な API を実装しています。 バージョン 3.3 で変更: このモジュールは利用出来 ... ら XML 文書 countrydata を使用します: import xml.etree.ElementTree as ET root = ET . fromstring ( countrydata ) # Top-level elements root . findall ( "." ) # All 'neighbor' grand-children of 'country' children of the top-level # elements root . findall ( ... れた {namespace}tag 記法を使います。 # 文書内のすべての Dublin Core の "title" タグ root . findall ( ".//{http://purl.org/dc/elements/1.1/}title" ) サポートされている XPath 構文 操作 意味 tag 指定されたタグを持つすべての子要素を選択します。 例えば spam は名 ... g ( element , encoding = 'us-ascii' , method = 'xml' , * , xml_declaration = None , default_namespace = None , short_empty_elements = True ) XML 要素を全ての子要素を含めて表現する文字列を生成します。 element は Element のインスタンスです。 encoding [ 1 ] ...
https://man.mtool.work/python/3.14/library/xml.etree.elementtree.html
xml.sax.saxutils --- SAX ユーティリティー 11568
xml.sax.saxutils --- SAX ユーティリティー ソースコード: Lib/xml/sax/saxutils.py xml.sax.saxutils モジュールには、SAX アプリケーションの作成時に、直接使ったり基底クラスとして使ったりできる便利なクラスと関数が含まれています。 xml.sax.saxutils ... の属性値を生成するのに便利です。 class xml.sax.saxutils. XMLGenerator ( out = None , encoding = 'iso-8859-1' , short_empty_elements = False ) このクラスは SAX イベントを XML 文書に書き戻すことで ContentHandler インターフェースを実装しています。 つまり、 ... デフォルトは sys.stdout です。 encoding は出力ストリームのエンコーディングで、デフォルトは 'iso-8859-1' です。 short_empty_elements は 内容を持たない要素のフォーマットを制御します。 False (デフォルト) の場合、開始/終了タグのペアとなり、 True の場合、1つの ... 空タグになります。 バージョン 3.2 で変更: short_empty_elements 引数を追加しました。 class xml.sax.saxutils. XMLFilterBase ( base ) このクラスは XMLReader とクライアント・アプリケーション ...
https://man.mtool.work/python/3.14/library/xml.sax.utils.html
collections.abc --- コンテナの抽象基底クラス 11061
collections.abc --- コンテナの抽象基底クラス Added in version 3.3: 以前はこのモジュールは collections モジュールの一部でした。 ソースコード: Lib/_collections_abc.py このモジュールは、 抽象基底クラス を提供します。抽象基底クラスは、クラスが特 ... BasedSet ( collections . abc . Set ): ''' Alternate set implementation favoring space over speed and not requiring the set elements to be hashable. ''' def __init__ ( self , iterable ): self . elements = lst = [] for value in iterable : if value not in l ... st : lst . append ( value ) def __iter__ ( self ): return iter ( self . elements ) def __contains__ ( self , value ): return value in self . elements def __len__ ( self ): return len ( self . elements ) ...
https://man.mtool.work/python/3.14/library/collections.abc.html
10. 完全な文法仕様 11061
10. 完全な文法仕様 以下は Python の完全な文法で、CPython のパーサを生成するための文法から直接得たものです ( Grammar/python.gram を参照)。 ここでは、コード生成とエラー回復に関する詳細を省略しています。 ここで使う記法は、これまでのドキュメント ... # PEG grammar for Python # ========================= START OF THE GRAMMAR ========================= # General grammatical elements and rules: # # * Strings with double quotes (") denote SOFT KEYWORDS # * Strings with single quotes (') denote KEYWORDS # ... dotted_name [ 'as' NAME ] dotted_name : | dotted_name '.' NAME | NAME # COMPOUND STATEMENTS # =================== # Common elements # --------------- block : | NEWLINE INDENT statements DEDENT | simple_stmts decorators : ( '@' named_expression NEWLINE ) ... ctor factor : | '+' factor | '-' factor | '~' factor | power power : | await_primary '**' factor | await_primary # Primary elements # ---------------- # Primary elements are things like "obj.something.something", "obj[something]", "obj(something)", "obj" ...
https://man.mtool.work/python/3.14/reference/grammar.html
6. 式 (expression) 9759
6. 式 (expression) この章では、Python の式における個々の要素の意味について解説します。 構文上の注意: この章以降では、 文法の表記法 を字句解析ではなく構文の記述に使います。 構文規則の (選択肢の 1 つの) 形式が次のように記述され、 name : other ... 則が適用されます。 拡張では独自の変換動作を定義する必要があります。 6.2. アトム、原子的要素 (atom) Atoms are the most basic elements of expressions. The simplest atoms are names or literals. Forms enclosed in parentheses, brackets or braces are also categ ... d 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" ] "for" target_list "in" or_te ... 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 container are those that would be produced by considering each of the for or if clauses a block, nesting from l ...
https://man.mtool.work/python/3.14/reference/expressions.html
collections --- コンテナデータ型 8997
collections --- コンテナデータ型 ソースコード: Lib/collections/__init__.py このモジュールは、汎用の Python 組み込みコンテナ dict , list , set , および tuple に代わる、特殊なコンテナデータ型を実装しています。 namedtuple() 名前付きフィールドを ... 序になります。 カウンタオブジェクトは全ての辞書で利用できるメソッドに加えて、以下に示す追加のメソッドをサポートしています。 elements ( ) それぞれの要素を、そのカウント分の回数だけ繰り返すイテレータを返します。要素は挿入した順番で返されます。ある要素のカウ ... ントが 1 未満なら、 elements() はそれを無視します。 >>> c = Counter ( a = 4 , b = 2 , c = 0 , d =- 2 ) >>> sorted ( c . elements ()) ['a', 'a', 'a', 'a ... counts greater than zero). Addition and subtraction combine counters by adding or subtracting the counts of corresponding elements. Intersection and union return the minimum and maximum of corresponding counts. Equality and inclusion compare correspondi ...
https://man.mtool.work/python/3.14/library/collections.html
difflib --- 差分の計算の補助 8997
difflib --- 差分の計算の補助 ソースコード: Lib/difflib.py このモジュールはシーケンスを比較するクラスと関数を提供します。 その多くは、テキスト行のシーケンス (文字列のリストや ファイルオブジェクト など) を比較し、相違点を報告する 差分 (diff) ... t_matching_blocks() が便利です: >>> for block in s . get_matching_blocks (): ... print ( "a[ %d ] and b[ %d ] match for %d elements" % block ) a[0] and b[0] match for 8 elements a[8] and b[17] match for 21 elements a[29] and b[38] match for 0 elements ge ...
https://man.mtool.work/python/3.14/library/difflib.html
組み込み型の操作の時間計算量 8727
組み込み型の操作の時間計算量 このページでは、CPython の組み込み型に対するさまざまな操作の時間計算量を説明します。 ほかの Python 実装では、性能の特性が異なる場合があります。 また、サブクラスのインスタンスではコストが異なる場合があるため、ここ ... 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ) These operations scan the container's internal hash table, which is not shrunk when elements are removed. After removing most elements, they still take time proportional to the container's former size, until a later ...
https://man.mtool.work/python/3.14/builtins/time-complexity.html
デザインと歴史 FAQ 8219
デザインと歴史 FAQ Python はなぜ文のグループ化にインデントを使うのですか? Guido van Rossum の信じるところによれば、インデントによるグループ化は非常にエレガントで、普通の Python プログラムを大いに読みやすくします。しばらくすればほとんどの人は ... ァイルを加えても壊れません。 Tuples are immutable, meaning that once a tuple has been created, you can't replace any of its elements with a new value. Lists are mutable, meaning that you can always change a list's elements. Only immutable elements can be ...
https://man.mtool.work/python/3.14/faq/design.html
What's New in Python 2.7 7949
What's New in Python 2.7 著者 : A.M. Kuchling (amk at amk.ca) この文書は Python 2.7 の新機能について解説します。Python 2.7 は 2010 年 7 月 3 日にリリースされました。 数値周りの扱いが、浮動小数点数でも Decimal クラスでもいろいろな点で改良され ... [ 'z' ] 0 Counter には追加の3つのメソッドがあります。 most_common() はカウントが最も多い N 要素とそのカウントを返します。 elements() はカウントしている要素を、そのカウント数だけ繰り返すイテレータを返します。 subtract() はイテレート可能型を受け取り、その ... った場合は、そのカウントが引かれます。 >>> c . most_common ( 5 ) [(' ', 6), ('e', 5), ('s', 3), ('a', 2), ('i', 2)] >>> c . elements () -> 'a', 'a', ' ', ' ', ' ', ' ', ' ', ' ', 'e', 'e', 'e', 'e', 'e', 'g', 'f', 'i', 'i', 'h', 'h', 'm', 'l', 'l', 'o', ' ... rite() methods now have a method parameter that can be "xml" (the default), "html", or "text". HTML mode will output empty elements as <empty></empty> instead of <empty/> , and text mode will skip over elements and only output the text chunks. If you set ...
https://man.mtool.work/python/3.14/whatsnew/2.7.html
PREV 1 2 3 NEXT