per page, with , order by , clip by
Results of 1 - 10 of about 34 for fields (0.008 sec.)
ctypes --- Python 用の外部関数ライブラリ 14779
ctypes --- Python 用の外部関数ライブラリ ソースコード: Lib/ctypes ctypes は Python 用の外部関数ライブラリです。 C と互換性のあるデータ型を提供し、DLL や共有ライブラリの関数を呼び出せます。 これらのライブラリを純粋な Python でラップするために ... 造体と共用体は、 ctypes モジュールが定義する Structure と Union の基底クラスから派生させる必要があります。 各サブクラスには _fields_ 属性を定義する必要があります。 _fields_ は、 フィールド名 と フィールドの型 を含む 2 要素のタプル のリストでなければなりま ... 例です。コンストラクタで構造体を初期化する方法も説明しています: >>> from ctypes import * >>> class POINT ( Structure ): ... _fields_ = [( "x" , c_int ), ... ( "y" , c_int )] ... >>> point = POINT ( 10 , 20 ) >>> print ( point . x , point . y ) 10 20 >>> ... とができます。 upperleft と lowerright という名前の二つの POINT を持つ RECT 構造体です。: >>> class RECT ( Structure ): ... _fields_ = [( "upperleft" , POINT ), ... ( "lowerright" , POINT )] ... >>> rc = RECT ( point ) >>> print ( rc . upperleft . x , rc ...
https://man.mtool.work/python/3.14/library/ctypes.html
dataclasses --- データクラス 12462
dataclasses --- データクラス ソースコード: Lib/dataclasses.py このモジュールは、 __init__() や __repr__() のような 特殊メソッド を生成し、ユーザー定義のクラスに自動的に追加するデコレーターや関数を提供します。このモジュールは元々、 PEP 557 で ... ts__ には含まれません。 したがって、データクラスのフィールド名を取得するために __slots__ を使用しないでください。 代わりに fields() を使用してください。 継承するスロットを判定できるように、基底クラスの __slots__ には任意のイテラブルを使用できますが、イ ... Field Field オブジェクトは、定義された各フィールドを記述します。 これらのオブジェクトは内部で作成され、モジュールレベルの fields() 関数 (後述) から返されます。 ユーザーが Field オブジェクトを直接インスタンス化してはいけません。 公開されている属性は以下 ... ョンは、 初期化限定 の変数を記述します。 InitVar でアノテーションされたフィールドは疑似フィールドとみなされます。 そのため、 fields() 関数から返されず、 __init__() および存在する場合は __post_init__() のパラメータとして追加する以外の用途には使われません。 ...
https://man.mtool.work/python/3.14/library/dataclasses.html
uuid --- RFC 9562 に基づく UUID オブジェクト 10001
uuid --- RFC 9562 に基づく UUID オブジェクト ソースコード: Lib/uuid.py このモジュールは、イミュータブルな UUID オブジェクト ( UUID クラス) と、 RFC 9562 ( RFC 4122 を置き換える RFC) で規定された特定のバージョンの UUID を生成する 関数 を提供 ... ムは、UUID が安全に生成されたかどうかの情報を提供しなかった class uuid. UUID ( hex = None , bytes = None , bytes_le = None , fields = None , int = None , version = None , * , is_safe = SafeUUID.unknown ) 以下のいずれかから UUID を作成します: 32 桁の 16 進 ... エンディアンの 16 バイトの bytes オブジェクト、 bytes_le 引数に指定したリトルエンディアンの 16 バイトの bytes オブジェクト、 fields 引数に指定した 6 つの整数のタプル (32 ビットの time_low 、16 ビットの time_mid 、16 ビットの time_hi_version 、 8 ビットの ... x56\x78 ' * 4 ) UUID ( bytes_le = b ' \x78\x56\x34\x12\x34\x12\x78\x56 ' + b ' \x12\x34\x56\x78\x12\x34\x56\x78 ' ) UUID ( fields = ( 0x12345678 , 0x1234 , 0x5678 , 0x12 , 0x34 , 0x567812345678 )) UUID ( int = 0x12345678123456781234567812345678 ) hex 、 ...
https://man.mtool.work/python/3.14/library/uuid.html
urllib.parse --- URL を構成要素に解析する 9394
urllib.parse --- URL を構成要素に解析する ソースコード: Lib/urllib/parse.py このモジュールでは URL (Uniform Resource Locator) 文字列をその構成要素 (アドレススキーム、ネットワーク上の位置、パスその他) に分解したり、構成要素を URL に組みなおし ... se. parse_qs ( qs , keep_blank_values = False , strict_parsing = False , encoding = 'utf-8' , errors = 'replace' , max_num_fields = None , separator = '&' ) 文字列引数として渡されたクエリ文字列 ( application/x-www-form-urlencoded 型のデータ) を解析しま ... れたシーケンスを Unicode 文字にデコードする方法を指定します。これは bytes.decode() メソッドに渡されます。 任意の引数 max_num_fields は読み込むフィールド数の上限です。 指定した場合、読み込むフィールド数が max_num_fields を超えると ValueError を送出します。 ... して) 使用します。 バージョン 3.2 で変更: encoding および errors パラメータが追加されました。 バージョン 3.8 で変更: max_num_fields パラメータが追加されました。 バージョン 3.10 で変更: separator パラメータが追加されました。 デフォルト値は & です。 Python ...
https://man.mtool.work/python/3.14/library/urllib.parse.html
ast --- 抽象構文木 9266
ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在 ... lternatives) (別名 "sums") の場合、左辺は抽象クラスとなり、特定のコンストラクタ・ノードのインスタンスのみが作成されます。 _fields 各具象クラスは属性 _fields を持っており、すべての子ノードの名前をそこに保持しています。 具象クラスのインスタンスは、各子ノ ... 存在しなければならず、そして妥当な値でなければなりません。 _field_types 各具象クラスの _field_types 属性は、フィールド名 ( _fields にも列挙されています) をその型に対応付ける辞書です。 >>> ast . TypeVar . _field_types {'name': <class 'str'>, 'bound': ast ... nd_col_offset] により取得できます。 クラス ast.T のコンストラクタは引数を次のように解析します: 位置引数があるとすれば、 T._fields にあるのと同じだけの個数が無ければなりません。これらの引数はそこにある名前を持った属性として割り当てられます。 キーワード引 ...
https://man.mtool.work/python/3.14/library/ast.html
collections --- コンテナデータ型 8531
collections --- コンテナデータ型 ソースコード: Lib/collections/__init__.py このモジュールは、汎用の Python 組み込みコンテナ dict , list , set , および tuple に代わる、特殊なコンテナデータ型を実装しています。 namedtuple() 名前付きフィールドを ... ます。 バージョン 3.13 で変更: キーワード引数が無効な場合は ValueError のかわりに TypeError が発生します。 somenamedtuple. _fields フィールド名をリストにしたタプルです。内省 (introspection) したり、既存の名前付きタプルをもとに新しい名前つきタプルを作成す ... る時に便利です。 >>> p . _fields # フィールド名を表示 ('x', 'y') >>> Color = namedtuple ( 'Color' , 'red green blue' ) >>> Pixel = namedtuple ( 'Pixel' , P ... oint . _fields + Color . _fields ) >>> Pixel ( 11 , 22 , 128 , 255 , 0 ) Pixel(x=11, y=22, red=128, green=255, blue=0) somenamedtuple. _f ...
https://man.mtool.work/python/3.14/library/collections.html
タプルオブジェクト (tuple object) 8052
タプルオブジェクト (tuple object) type PyTupleObject この PyObject のサブタイプは Python のタプルオブジェクトを表現します。 PyTypeObject PyTuple_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python のタプル型を表現します ... ール名を含む必要があります。 const char * doc 型の docstring へのポインタ。 省略する場合は NULL 。 PyStructSequence_Field * fields 新しい型のフィールド名を持つ、 NULL 終端の配列へのポインタ。 int n_in_sequence タプルとして使う場合に Python 側から見えるフ ... 述します。 struct sequence はタプルをモデルとしているので、すべてのフィールドは PyObject * 型です。 PyStructSequence_Desc の fields 配列内のインデックスによって、struct sequence のどのフィールドを記述するかが決まります。 const char * name フィールド名。 ...
https://man.mtool.work/python/3.14/c-api/tuple.html
typing --- 型ヒントのサポート 7924
typing --- 型ヒントのサポート Added in version 3.5. ソースコード: Lib/typing.py 注釈 Python ランタイムは、関数や変数の型アノテーションを強制しません。型アノテーションは、 type checkers や IDE、linterなどのサードパーティーツールで使われます。 ... ん。 作成されたクラスに対して annotationlib.get_annotations() を呼び出すと、各フィールドの型を取得できます。 フィールド名は _fields 属性、デフォルト値は _field_defaults 属性に格納されており、どちらも namedtuple() API の一部です。 NamedTuple のサブクラスは ... 、バージョン 3.15 で削除予定: When using the functional syntax to create a NamedTuple class, failing to pass a value to the 'fields' parameter ( NT = NamedTuple("NT") ) is deprecated. Passing None to the 'fields' parameter ( NT = NamedTuple("NT", None) ) ... is also deprecated. Both will be disallowed in Python 3.15. To create a NamedTuple class with 0 fields, use class NT(NamedTuple): pass or NT = NamedTuple("NT", []) . class typing. NewType ( name , tp ) オーバーヘッドの小さい ...
https://man.mtool.work/python/3.14/library/typing.html
Expat C API 7797
Expat C API The xml.parsers.expat module exposes selected Expat functions through its expat_CAPI capsule. This allows extension modules to use the same Expat library as Python. The interface is declared in pyexpat.h , which must be included ... it as read-only and do not free it. Keep a strong reference to the capsule while using the table. Check the compatibility fields as described under PyExpat_CAPI_MAGIC before using the function pointers. char * magic Interface identifier, set to PyExpa ...
https://man.mtool.work/python/3.14/c-api/pyexpat.html
Python 3.15 で削除予定 7797
Python 3.15 で削除予定 インポートシステム: Setting __cached__ on a module while failing to set __spec__.cached is deprecated. In Python 3.15, __cached__ will cease to be set or take into consideration by the import system or standard librar ... は Python 3.13 から非推奨です。 代わりにクラスベースの構文か関数形式の構文を使ってください。 TypedDict の関数形式の構文で、 fields パラメータを省略すること ( TD = TypedDict("TD") ) や None を渡すこと ( TD = TypedDict("TD", None) ) は Python 3.13 から非推 ...
https://man.mtool.work/python/3.14/deprecations/pending-removal-in-3.15.html
PREV 1 2 3 4 NEXT