per page, with , order by , clip by
Results of 1 - 10 of about 136 for GetItem (0.009 sec.)
3. データモデル — Python 3.14.8 ドキュメント 11927
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 3. データモデル テーマ 自動 ライト ダーク | 3. データモデル ¶ 3.1. オブジェクト、値、および型 ¶ Objects are Python's abstraction for da ... バージョン 3.7 で変更: This attribute is now writable 3.2.13.4. スライス (slice) オブジェクト ¶ スライスオブジェクトは、 __getitem__() メソッドのためのスライスを表すのに使われます。スライスオブジェクトは組み込みの slice() 関数でも生成されます。 読み出し ... loading ) へのアプローチです。これにより、クラスは言語の演算子に対する独自の振る舞いを定義できます。例えば、あるクラスが __getitem__() という名前のメソッドを定義しており、 x がこのクラスのインスタンスであるとすると、 x[i] は type(x).__getitem__(x, i) と ... クラスの __iter__() を None に設定した場合、そのクラスはイテラブルにはならず、そのインスタンスに対し iter() を呼び出すと ( __getitem__() に処理が戻されずに) TypeError を送出します。 [ 2 ] When implementing a class that emulates any built-in type, it is im ...
https://man.mtool.work/python/3.14/reference/datamodel.html
3. データモデル — Python 3.14.8 ドキュメント 11831
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 3. データモデル テーマ 自動 ライト ダーク | 3. データモデル ¶ 3.1. オブジェクト、値、および型 ¶ Objects are Python's abstraction for da ... バージョン 3.7 で変更: This attribute is now writable 3.2.13.4. スライス (slice) オブジェクト ¶ スライスオブジェクトは、 __getitem__() メソッドのためのスライスを表すのに使われます。スライスオブジェクトは組み込みの slice() 関数でも生成されます。 読み出し ... loading ) へのアプローチです。これにより、クラスは言語の演算子に対する独自の振る舞いを定義できます。例えば、あるクラスが __getitem__() という名前のメソッドを定義しており、 x がこのクラスのインスタンスであるとすると、 x[i] は type(x).__getitem__(x, i) と ... クラスの __iter__() を None に設定した場合、そのクラスはイテラブルにはならず、そのインスタンスに対し iter() を呼び出すと ( __getitem__() に処理が戻されずに) TypeError を送出します。 [ 2 ] When implementing a class that emulates any built-in type, it is im ...
https://man.mtool.work/python/3.14/reference/datamodel.html
マップ型プロトコル (mapping protocol) — Python 3.14.8 ドキュメント 9897
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 抽象オブジェクトレイヤ (Abstract Objects Layer) » マップ型プロトコル (mapping protocol) テーマ 自動 ライト ダーク | マップ型プロト ... コル (mapping protocol) ¶ PyObject_GetItem() , PyObject_SetItem() , PyObject_DelItem() も参照してください。 int PyMapping_Check ( PyObject * o ) ¶ 次に属します: Stab ... ect provides the mapping protocol or supports slicing, and 0 otherwise. Note that it returns 1 for Python classes with a __getitem__() method, since in general it is impossible to determine what type of keys the class supports. This function always succ ... ジェクト o 中のキーの数を返し、失敗すると -1 を返します。これは、Python の式 len(o) と同じになります。 PyObject * PyMapping_GetItemString ( PyObject * o , const char * key ) ¶ 戻り値: 新しい参照。 次に属します: Stable ABI . This is the same as PyObject_G ...
https://man.mtool.work/python/3.14/c-api/mapping.html
collections.abc --- コンテナの抽象基底クラス — Python 3.14.8 ドキュメント 9813
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » collections.abc --- コンテナの抽象基底クラス テーマ 自動 ライト ダーク | collections.abc --- コンテナの抽象基底クラス ¶ ... needed: class C ( Sequence ): # Direct inheritance def __init__ ( self ): ... # Extra method not required by the ABC def __getitem__ ( self , index ): ... # Required abstract method def __len__ ( self ): ... # Required abstract method def count ( self , ... om the rest of the API: class D : # No inheritance def __init__ ( self ): ... # Extra method not required by the ABC def __getitem__ ( self , index ): ... # Abstract method def __len__ ( self ): ... # Abstract method def count ( self , value ): ... # Mi ... er__ , __reversed__ を定義する必要がありません。なぜなら in 演算子 , the 反復 ロジック, および reversed() 関数は自動的に __getitem__ と __len__ を使うようにフォールバックするからです。 Some simple interfaces are directly recognizable by the presence of ...
https://man.mtool.work/python/3.14/library/collections.abc.html
collections.abc --- コンテナの抽象基底クラス — Python 3.14.8 ドキュメント 9813
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » collections.abc --- コンテナの抽象基底クラス テーマ 自動 ライト ダーク | collections.abc --- コンテナの抽象基底クラス ¶ ... needed: class C ( Sequence ): # Direct inheritance def __init__ ( self ): ... # Extra method not required by the ABC def __getitem__ ( self , index ): ... # Required abstract method def __len__ ( self ): ... # Required abstract method def count ( self , ... om the rest of the API: class D : # No inheritance def __init__ ( self ): ... # Extra method not required by the ABC def __getitem__ ( self , index ): ... # Abstract method def __len__ ( self ): ... # Abstract method def count ( self , value ): ... # Mi ... er__ , __reversed__ を定義する必要がありません。なぜなら in 演算子 , the 反復 ロジック, および reversed() 関数は自動的に __getitem__ と __len__ を使うようにフォールバックするからです。 Some simple interfaces are directly recognizable by the presence of ...
https://man.mtool.work/python/3.14/library/collections.abc.html
マップ型プロトコル (mapping protocol) — Python 3.14.8 ドキュメント 9344
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 抽象オブジェクトレイヤ (Abstract Objects Layer) » マップ型プロトコル (mapping protocol) テーマ 自動 ライト ダーク | マップ型プロト ... コル (mapping protocol) ¶ PyObject_GetItem() , PyObject_SetItem() , PyObject_DelItem() も参照してください。 int PyMapping_Check ( PyObject * o ) ¶ 次に属します: Stab ... ect provides the mapping protocol or supports slicing, and 0 otherwise. Note that it returns 1 for Python classes with a __getitem__() method, since in general it is impossible to determine what type of keys the class supports. This function always succ ... ジェクト o 中のキーの数を返し、失敗すると -1 を返します。これは、Python の式 len(o) と同じになります。 PyObject * PyMapping_GetItemString ( PyObject * o , const char * key ) ¶ 戻り値: 新しい参照。 次に属します: Stable ABI . This is the same as PyObject_G ...
https://man.mtool.work/python/3.14/c-api/mapping.html
タプルオブジェクト (tuple object) — Python 3.14.8 ドキュメント 8612
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » タプルオブジェクト (tuple object) テーマ 自動 ライト ダーク | タプルオブジェクト (tup ... n set. Py_ssize_t PyTuple_GET_SIZE ( PyObject * p ) ¶ Like PyTuple_Size() , but without error checking. PyObject * PyTuple_GetItem ( PyObject * p , Py_ssize_t pos ) ¶ 戻り値: 借用参照。 次に属します: Stable ABI . p の指すタプルオブジェクト内の、位置 pos ... ple p (that is: it is only valid as long as you hold a reference to p ). To get a strong reference , use Py_NewRef(PyTuple_GetItem(...)) or PySequence_GetItem() . PyObject * PyTuple_GET_ITEM ( PyObject * p , Py_ssize_t pos ) ¶ 戻り値: 借用参照。 PyTuple ... _GetItem() に似ていますが、引数に対するエラーチェックを行いません。 PyObject * PyTuple_GetSlice ( PyObject * p , Py_ssize_t low , P ...
https://man.mtool.work/python/3.14/c-api/tuple.html
タプルオブジェクト (tuple object) — Python 3.14.8 ドキュメント 8612
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » タプルオブジェクト (tuple object) テーマ 自動 ライト ダーク | タプルオブジェクト (tup ... n set. Py_ssize_t PyTuple_GET_SIZE ( PyObject * p ) ¶ Like PyTuple_Size() , but without error checking. PyObject * PyTuple_GetItem ( PyObject * p , Py_ssize_t pos ) ¶ 戻り値: 借用参照。 次に属します: Stable ABI . p の指すタプルオブジェクト内の、位置 pos ... ple p (that is: it is only valid as long as you hold a reference to p ). To get a strong reference , use Py_NewRef(PyTuple_GetItem(...)) or PySequence_GetItem() . PyObject * PyTuple_GET_ITEM ( PyObject * p , Py_ssize_t pos ) ¶ 戻り値: 借用参照。 PyTuple ... _GetItem() に似ていますが、引数に対するエラーチェックを行いません。 PyObject * PyTuple_GetSlice ( PyObject * p , Py_ssize_t low , P ...
https://man.mtool.work/python/3.14/c-api/tuple.html
C API Extension Support for Free Threading — Python 3.14.8 ドキュメント 7507
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » C API Extension Support for Free Threading テーマ 自動 ライト ダーク | C API Extension Support for Free Threading ¶ Starting with the 3.13 release ... These APIs are not thread-safe if the containing object is modified concurrently. For example, it's not safe to use PyList_GetItem() if the list may be modified concurrently. The following table lists some borrowed reference APIs and their replacements ... that return strong references . Borrowed reference API Strong reference API PyList_GetItem() PyList_GetItemRef() PyList_GET_ITEM() PyList_GetItemRef() PyDict_GetItem() PyDict_GetItemRef() PyDict_GetItemWithError() ... PyDict_GetItemRef() PyDict_GetItemString() PyDict_GetItemStringRef() PyDict_SetDefault() PyDict_SetDefaultRef() PyDict_Next() none (see P ...
https://man.mtool.work/python/3.14/howto/free-threading-extensions.html
6. 式 (expression) — Python 3.14.8 ドキュメント 7422
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 6. 式 (expression) テーマ 自動 ライト ダーク | 6. 式 (expression) ¶ この章では、Python の式における個々の要素の意味について解説します。 ... e argument str list[str] At runtime, the interpreter will evaluate the primary and the subscript, and call the primary's __getitem__() or __class_getitem__() special method with the subscript as argument. For more details on which of these methods is ca ... lled, see __class_getitem__ versus __getitem__ . To show how subscription works, we can define a custom object that implements __getitem__() and pri ... nts out the value of the subscript: >>> class SubscriptionDemo : ... def __getitem__ ( self , key ): ... print ( f 'subscripted with: { key !r} ' ) ... >>> demo = SubscriptionDemo () >>> demo [ 1 ] subscri ...
https://man.mtool.work/python/3.14/reference/expressions.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT