per page, with , order by , clip by
Results of 1 - 10 of about 54 for Mapping (0.009 sec.)
collections --- コンテナデータ型 14106
collections --- コンテナデータ型 ソースコード: Lib/collections/__init__.py このモジュールは、汎用の Python 組み込みコンテナ dict , list , set , および tuple に代わる、特殊なコンテナデータ型を実装しています。 namedtuple() 名前付きフィールドを ... ss DeepChainMap ( ChainMap ): '内側のスコープを直接更新できる ChainMap の変種' def __setitem__ ( self , key , value ): for mapping in self . maps : if key in mapping : mapping [ key ] = value return self . maps [ 0 ][ key ] = value def __delitem__ ( sel ... f , key ): for mapping in self . maps : if key in mapping : del mapping [ key ] return raise KeyError ( key ) >>> d = DeepChainMap ({ 'zebra' : ' ... ss collections. Counter ( ** kwargs ) class collections. Counter ( iterable , / , ** kwargs ) class collections. Counter ( mapping , / , ** kwargs ) Counter は ハッシュ可能 なオブジェクトをカウントする dict のサブクラスです。これは、要素を辞書のキーとし ...
https://man.mtool.work/python/3.14/library/collections.html
typing --- 型ヒントのサポート 11866
typing --- 型ヒントのサポート Added in version 3.5. ソースコード: Lib/typing.py 注釈 Python ランタイムは、関数や変数の型アノテーションを強制しません。型アノテーションは、 type checkers や IDE、linterなどのサードパーティーツールで使われます。 ... ため、標準ライブラリの多くのコンテナクラスは、要素に期待する型を示す添字表記をサポートしています from collections.abc import Mapping , Sequence class Employee : ... # Sequence[Employee] はシーケンスの要素がすべて "Employee" の # インスタンスでなければなら ... ないということを表します。 # Mapping[str, str] は mapping に含まれるキーとバリューが # すべて文字列である必要があることを表します。 def notify_by_email ( emplo ... yees : Sequence [ Employee ], overrides : Mapping [ str , str ]) -> None : ... ジェネリック関数およびクラスは以下の通り、 型引数構文 を使うことでパラメータ化できます: from ...
https://man.mtool.work/python/3.14/library/typing.html
Unicode オブジェクトと codec 10131
Unicode オブジェクトと codec Unicode オブジェクト Python 3.3 で PEP 393 が実装されて以来、Unicode オブジェクトは内部で複数の表現形式を使っています。 これにより、メモリ効率を維持しながら Unicode 文字の全範囲を扱えます。 すべてのコードポイント ... ます。 PyObject * PyUnicode_BuildEncodingMap ( PyObject * string ) 戻り値: 新しい参照。 次に属します: Stable ABI . Return a mapping suitable for decoding a custom single-byte encoding. Given a Unicode string string of up to 256 characters representing an ... encoding table, returns either a compact internal mapping object or a dictionary mapping character ordinals to byte values. Raises a TypeError and return NULL on invalid input. Add ... __getitem__() マッピングインターフェースをサポートしていなければなりません; 辞書やシーケンスがそれに適しています。 以下は mapping codec の APIです: PyObject * PyUnicode_DecodeCharmap ( const char * str , Py_ssize_t length , PyObject * mapping , const c ...
https://man.mtool.work/python/3.14/c-api/unicode.html
collections.abc --- コンテナの抽象基底クラス 10131
collections.abc --- コンテナの抽象基底クラス Added in version 3.3: 以前はこのモジュールは collections モジュールの一部でした。 ソースコード: Lib/_collections_abc.py このモジュールは、 抽象基底クラス を提供します。抽象基底クラスは、クラスが特 ... スの推測ができません。たとえば、あるクラスが __getitem__ , __len__ , および __iter__ を提供するというだけでは、 Sequence と Mapping を区別するには不十分です。 Added in version 3.9: これらの抽象クラスは [] をサポートするようになりました。 ジェネリックエイ ... r__ , __len__ , add , discard Set から継承したメソッドと、 clear , pop , remove , __ior__ , __iand__ , __ixor__ , __isub__ Mapping Collection __getitem__ , __iter__ , __len__ __contains__ , keys , items , values , get , __eq__ , __ne__ MutableMapping Ma ... pping __getitem__ , __setitem__ , __delitem__ , __iter__ , __len__ Mapping から継承したメソッドと、 pop , popitem , clear , update , setdefault MappingView Sized __init__ , __len__ , __repr__ Items ...
https://man.mtool.work/python/3.14/library/collections.abc.html
型オブジェクトの構造体 9641
型オブジェクトの構造体 新しい型を定義する PyTypeObject 構造体は、Python のオブジェクトシステムで特に重要な構造体の 1 つです。 型オブジェクトは PyObject_* 関数や PyType_* 関数で扱えますが、ほとんどの Python アプリケーションにとって関心のある ... pr reprfunc __repr__ X X X tp_as_number PyNumberMethods * sub-slots % tp_as_sequence PySequenceMethods * sub-slots % tp_as_mapping PyMappingMethods * sub-slots % tp_hash hashfunc __hash__ X G tp_call ternaryfunc __call__ X X tp_str reprfunc __str__ X X ... reprfunc tp_repr ; /* 標準クラス用のメソッド群 */ PyNumberMethods * tp_as_number ; PySequenceMethods * tp_as_sequence ; PyMappingMethods * tp_as_mapping ; /* その他の標準の操作 (バイナリ互換性のためこの位置に配置) */ hashfunc tp_hash ; ternaryfunc tp_c ... 体 で説明されています。 継承: tp_as_sequence フィールドは継承されませんが、これに含まれるフィールドが個別に継承されます。 PyMappingMethods * PyTypeObject . tp_as_mapping マッピングプロトコルを実装した追加の構造体を指すポインタです。これらのフィールドにつ ...
https://man.mtool.work/python/3.14/c-api/typeobj.html
string --- 一般的な文字列操作 8648
string --- 一般的な文字列操作 ソースコード: Lib/string/__init__.py 参考 テキストシーケンス型 --- str 文字列メソッド 文字列定数 このモジュールで定義されている定数は以下の通りです: string. ascii_letters 後述の ascii_lowercase と ascii_upperca ... おりです: class string. Template ( template ) コンストラクタはテンプレート文字列になる引数を一つだけ取ります。 substitute ( mapping = {} , / , ** kwds ) テンプレート置換を行い、新たな文字列を生成して返します。 mapping はテンプレート中のプレースホルダに対 ... オブジェクトです。辞書を指定する代わりに、キーワード引数も指定でき、その場合にはキーワードをプレースホルダ名に対応させます。 mapping と kwds の両方が指定され、内容が重複した場合には、 kwds に指定したプレースホルダを優先します。 safe_substitute ( mapping = ... {} , / , ** kwds ) substitute() と同じですが、プレースホルダに対応するものを mapping や kwds から見つけられなかった場合に、 KeyError 例外を送出する代わりにもとのプレースホルダがそのまま入ります。また、 subst ...
https://man.mtool.work/python/3.14/library/string.html
抽象オブジェクトレイヤ (Abstract Objects Layer) 8410
抽象オブジェクトレイヤ (Abstract Objects Layer) この章で説明する関数は、オブジェクトの型に依存しないような Python オブジェクトの操作や、(数値型全て、シーケンス型全てといった) 大まかな型のオブジェクトに対する操作を行ないます。関数を適用対象で ... API 呼び出しサポート API 数値型プロトコル (number protocol) シーケンス型プロトコル (sequence protocol) マップ型プロトコル (mapping protocol) イテレータプロトコル (iterator protocol) バッファプロトコル (buffer Protocol) buffer 構造体 バッファリクエストの ...
https://man.mtool.work/python/3.14/c-api/abstract.html
mmap --- メモリマップファイルのサポート 8410
mmap --- メモリマップファイルのサポート 利用可能な環境 : not WASI. このモジュールは WebAssembly では動作しないか、利用不可です。詳しくは、 WebAssembly プラットフォーム を見てください。 Memory-mapped file objects behave like both bytearray a ... is the current size of the file, except that if the file is empty Windows raises an exception (you cannot create an empty mapping on Windows). tagname は、 None 以外で指定された場合、マップのタグ名を与える文字列となります。 Windows は同じファイルに対す ... ze() メソッドは失敗します。 このモードは、開くファイル記述子の数を抑えるのに役立ちます。 macOS において、作成された memory mapping の正当性を確実にするために fileno で指定されたファイルディスクリプタは内部で自動的に物理的なストレージ (physical backing s ... ACCESS_DEFAULT mmap. ACCESS_READ mmap. ACCESS_WRITE mmap. ACCESS_COPY These constants specify the access mode for a memory mapping. ACCESS_READ provides read-only access, ACCESS_WRITE provides write-through access, and ACCESS_COPY provides copy-on-write ...
https://man.mtool.work/python/3.14/library/mmap.html
types --- 動的な型生成と組み込み型の名前 8410
types --- 動的な型生成と組み込み型の名前 ソースコード: Lib/types.py このモジュールは新しい型の動的な生成を支援するユーティリティ関数を定義します。 さらに、標準の Python インタプリタによって使用されているものの、 int や str のように組み込みと ... __dict__ に現れるようになります。 Pythonの他の実装では、この型は GetSetDescriptorType と同じかもしれません。 class types. MappingProxyType ( mapping ) 読み出し専用のマッピングのプロキシです。マッピングのエントリーに関する動的なビューを提供します。つまり ... 、マッピングが変わった場合にビューがこれらの変更を反映するということです。 MappingProxyType は 2 つの型を引数とする ジェネリック です。 型引数は順に、元になったマッピングのキーと値の型を表します。 Added in ... のキーはすべて文字列でなければなりません。 この型は以下のコードとほぼ等価です: class SimpleNamespace : def __init__ ( self , mapping_or_iterable = (), / , ** kwargs ): self . __dict__ . update ( mapping_or_iterable ) self . __dict__ . update ( kwargs ) de ...
https://man.mtool.work/python/3.14/library/types.html
10. 完全な文法仕様 8410
10. 完全な文法仕様 以下は Python の完全な文法で、CPython のパーサを生成するための文法から直接得たものです ( Grammar/python.gram を参照)。 ここでは、コード生成とエラー回復に関する詳細を省略しています。 ここで使う記法は、これまでのドキュメント ... osed_pattern : | literal_pattern | capture_pattern | wildcard_pattern | value_pattern | group_pattern | sequence_pattern | mapping_pattern | class_pattern # Literal patterns are used for equality and identity constraints literal_pattern : | signed_numbe ... ( '+' | '-' ) | complex_number | strings | 'None' | 'True' | 'False' # Literal expressions are used to restrict permitted mapping pattern keys literal_expr : | signed_number ! ( '+' | '-' ) | complex_number | strings | 'None' | 'True' | 'False' complex ... n + ',' ? maybe_star_pattern : | star_pattern | pattern star_pattern : | '*' pattern_capture_target | '*' wildcard_pattern mapping_pattern : | '{' '}' | '{' double_star_pattern ',' ? '}' | '{' items_pattern ',' double_star_pattern ',' ? '}' | '{' items_ ...
https://man.mtool.work/python/3.14/reference/grammar.html
PREV 1 2 3 4 5 6 NEXT