Results of 1 - 10 of about 68 for keys (0.006 sec.)
- dbm --- Unix "データベース" へのインターフェース 12807
- dbm --- Unix "データベース" へのインターフェース ソースコード: Lib/dbm/__init__.py dbm は DBM データベースの各種実装に対する汎用インターフェースです: dbm.sqlite3 dbm.gnu dbm.ndbm If none of these modules are installed, the slow-but-simple i
...な マッピング の基本的な機能に対応しています。 キーとそれに対応する値の保存、取得、削除に加え、イテレーション、 in 演算子、 keys() 、 get() 、 setdefault() 、 clear() メソッドを利用できます。 keys() メソッドはビューオブジェクトではなくリストを返します...で変更: すべての dbm バックエンドで clear() メソッドが使えるようになりました。 Key and value types The accepted types for keys and values vary by backend. Keys and values are handled the same way, except where noted below: Traditional backends: dbm....qlite3 ): Accepts str , bytes , int , float , bool , bytearray , memoryview , and array.array objects. Storage format: All keys and values are stored as bytes objects in the database. When retrieving, you'll always get bytes back, regardless of the o... - https://man.mtool.work/python/3.14/library/dbm.html
- json --- JSON エンコーダーとデコーダー 11729
- json --- JSON エンコーダーとデコーダー ソースコード: Lib/json/__init__.py JSON (JavaScript Object Notation) は、 RFC 7159 ( RFC 4627 を obsolete) と ECMA-404 によって定義された軽量のデータ交換用のフォーマットです。 JavaScript のオブジェクト
...34 ' )) "\u1234" >>> print ( json . dumps ( ' \\ ' )) "\\" >>> print ( json . dumps ({ "c" : 0 , "b" : 0 , "a" : 0 }, sort_keys = True )) {"a": 0, "b": 0, "c": 0} >>> from io import StringIO >>> io = StringIO () >>> json . dump ([ 'streaming API' ],...( ',' , ':' )) '[1,2,3,{"4":5,"6":7}]' 見やすい表示: >>> import json >>> print ( json . dumps ({ '6' : 7 , '4' : 5 }, sort_keys = True , indent = 4 )) { "4": 5, "6": 7 } JSON オブジェクトのエンコーディング方法をカスタマイズする: >>> import json >>> d...つようになっています。根底のコンテナに順序がない場合のみ、順序が失われます。 基本的な使い方 json. dump ( obj , fp , * , skipkeys = False , ensure_ascii = True , check_circular = True , allow_nan = True , cls = None , indent = None , separators = None... - https://man.mtool.work/python/3.14/library/json.html
- bisect --- 配列二分法アルゴリズム 11303
- bisect --- 配列二分法アルゴリズム ソースコード: Lib/bisect.py このモジュールは、挿入のたびにリストをソートすることなく、ソートされた順序でリストを維持するためのサポートを提供します。 コストのかかる比較演算を伴う長いリストの場合、これは線形検
...'yellow' , 8 ), ( 'black' , 0 )] >>> data . sort ( key = lambda r : r [ 1 ]) # または operator.itemgetter(1) を使う。 >>> keys = [ r [ 1 ] for r in data ] # キーのリストを事前に計算する。 >>> data [ bisect_left ( keys , 0 )] ('black', 0) >>> data [...bisect_left ( keys , 1 )] ('blue', 1) >>> data [ bisect_left ( keys , 5 )] ('red', 5) >>> data [ bisect_left ( keys , 8 )] ('yellow', 8) 他の...マニュアルの関連ページ Linux JM raise(3) PHP array_fill_keys() Linux JM tsort(1) Linux JM sort(1) PHP array_combine() Linux JM find(1)... - https://man.mtool.work/python/3.14/library/bisect.html
- plistlib --- Apple .plist ファイルを生成・解析する 10240
- plistlib --- Apple .plist ファイルを生成・解析する ソースコード: Lib/plistlib.py このモジュールは Apple (主に macOS と iOS) で使われる「プロパティーリスト」ファイルを読み書きするインターフェイスを提供します。このモジュールはバイナリと XML の
...ジョン 3.13 で変更: fmt が FMT_XML の場合、 data は文字列たり得ます。 plistlib. dump ( value , fp , * , fmt = FMT_XML , sort_keys = True , skipkeys = False , aware_datetime = False ) value を plist ファイルに書き込みます。 fp は書き込み可能なバイナリフ...ずれかの値をとることができます。 FMT_XML : XML 形式の plist ファイルです FMT_BINARY : バイナリ形式の plist ファイルです sort_keys が真 (デフォルト) の場合、辞書内のキーは、plist にソートされた順序で書き込まれます。偽の場合、ディクショナリのイテレートの...順序で書き込まれます。 skipkeys が偽 (デフォルト) の場合、この関数は辞書のキーが文字列でない場合に TypeError を送出します。真の場合、そのようなキーは読み飛... - https://man.mtool.work/python/3.14/library/plistlib.html
- ast --- 抽象構文木 9814
- ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在
..., expr operand ) | Lambda ( arguments args , expr body ) | IfExp ( expr test , expr body , expr orelse ) | Dict ( expr ?* keys , expr * values ) | Set ( expr * elts ) | ListComp ( expr elt , comprehension * generators ) | SetComp ( expr elt , compre...tchValue ( expr value ) | MatchSingleton ( constant value ) | MatchSequence ( pattern * patterns ) | MatchMapping ( expr * keys , pattern * patterns , identifier ? rest ) | MatchClass ( expr cls , pattern * patterns , identifier * kwd_attrs , pattern...patterns ) | MatchStar ( identifier ? name ) -- The optional "rest" MatchMapping parameter handles capturing extra mapping keys | MatchAs ( pattern ? pattern , identifier ? name ) | MatchOr ( pattern * patterns ) attributes ( int lineno , int col_off... - https://man.mtool.work/python/3.14/library/ast.html
- typing --- 型ヒントのサポート 9389
- typing --- 型ヒントのサポート Added in version 3.5. ソースコード: Lib/typing.py 注釈 Python ランタイムは、関数や変数の型アノテーションを強制しません。型アノテーションは、 type checkers や IDE、linterなどのサードパーティーツールで使われます。
...たり、 total=False の別の TypedDict を継承していたりする場合があります。 したがって、イントロスペクションには通常 __required_keys__ と __optional_keys__ を使う方が適切です。 __required_keys__ Added in version 3.9. __optional_keys__ Point2D.__required_k...eys__ と Point2D.__optional_keys__ は、それぞれ必須のキーと必須でないキーを含む frozenset オブジェクトを返します。 Required で指定したキーは必ず __required..._keys__ に含まれ、 NotRequired で指定したキーは必ず __optional_keys__ に含まれます。 Python 3.10 以前との後方互換性のために、継承... - https://man.mtool.work/python/3.14/library/typing.html
- annotationlib --- アノテーションを調べるための機能 8963
- annotationlib --- アノテーションを調べるための機能 Added in version 3.14. ソースコード: Lib/annotationlib.py annotationlib モジュールは、モジュール、クラス、関数の アノテーション を調べるためのツールを提供します。 アノテーションは 遅延評価
..., ns ): if "__annotations__" in ns : # from __future__ import annotations annotations = ns [ "__annotations__" ] classvar_keys = { key for key , value in annotations . items () # 簡単にするため文字列を比較する。より堅牢な方法には # annotationlib.For...rdRef.evaluate を使える if value . startswith ( "ClassVar" ) } classvars = { key : annotations [ key ] for key in classvar_keys } ns [ "__annotations__" ] = { key : value for key , value in annotations . items () if key not in classvar_keys } wrapped...annotations = annotationlib . call_annotate_function ( annotate , format = annotationlib . Format . FORWARDREF ) classvar_keys = { key for key , value in annotations . items () if typing . get_origin ( value ) is typing . ClassVar } classvars = { ke... - https://man.mtool.work/python/3.14/library/annotationlib.html
- modulefinder --- スクリプト中で使用されているモジュールの検索 8750
- modulefinder --- スクリプト中で使用されているモジュールの検索 ソースコード: Lib/modulefinder.py このモジュールでは、スクリプト中で import されているモジュールセットを調べるために使える ModuleFinder クラスを提供しています。 modulefinder.py は
..., mod in finder . modules . items (): print ( ' %s : ' % name , end = '' ) print ( ',' . join ( list ( mod . globalnames . keys ())[: 3 ])) print ( '-' * 50 ) print ( 'Modules not imported:' ) print ( ' \n ' . join ( finder . badmodules . keys ())) 出... - https://man.mtool.work/python/3.14/library/modulefinder.html
- The Python Profilers 8325
- 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
...力します。 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() がキーのタプルを受け取るように...sts. This is equivalent to the method of the same name on the profile.Profile and cProfile.Profile classes. sort_stats ( * keys ) This method modifies the Stats object by sorting it according to the supplied criteria. The argument can be either a str...er the string argument in that it is more robust and less error prone. When more than one key is provided, then additional keys are used as secondary criteria when there is equality in all keys selected before them. For example, sort_stats(SortKey.NA... - https://man.mtool.work/python/3.14/library/profile.html
- Dictionary Objects 8112
- Dictionary Objects type PyDictObject この PyObject のサブタイプは Python の辞書オブジェクトを表現します。 PyTypeObject PyDict_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python の辞書を表現します。このオブジェクトは、
...次に属します: Stable ABI . Thread safety: Atomic . 辞書内の全ての要素対が入った PyListObject を返します。 PyObject * PyDict_Keys ( PyObject * p ) 戻り値: 新しい参照。 次に属します: Stable ABI . Thread safety: Atomic . 辞書内の全てのキーが入った PyList...the same object . マッピングオブジェクト b を反復処理し、キーと値のペアを辞書 a に追加します。 b は辞書、または PyMapping_Keys() と PyObject_GetItem() の両方をサポートするオブジェクトであれば構いません。 override が真の場合、 b に一致するキーがあれば...ect . C で表せば PyDict_Merge(a, b, 1) と同じで、また Python の a.update(b) と似ていますが、 PyDict_Update() は第二引数が "keys" 属性を持たない場合にキー/値ペアのシーケンスを反復することはありません。成功した場合には 0 を返し、例外が送出された場合には... - https://man.mtool.work/python/3.14/c-api/dict.html