per page, with , order by , clip by
Results of 1 - 10 of about 103 for index (0.008 sec.)
リストオブジェクト 12496
リストオブジェクト type PyListObject この PyObject のサブタイプは Python のリストオブジェクトを表現します。 PyTypeObject PyList_Type 次に属します: Stable ABI . この PyTypeObject のインスタンスは Python のリスト型を表現します。これは Python ... c . PyList_Size() に似ていますが、エラーチェックを行いません。 PyObject * PyList_GetItemRef ( PyObject * list , Py_ssize_t index ) 戻り値: 新しい参照。 次に属します: Stable ABI (バージョン 3.13 より). Thread safety: Atomic . list が指すリストの位置 in ... dex にあるオブジェクトを返します。 位置は非負でなければならず、リストの末尾からのインデックス指定はサポートしません。 index が範囲外 ( <0 or >=len(list) ) の場合、 IndexError を設定して NULL を返します。 Added in version 3.13. PyObject * PyList_G ... etItem ( PyObject * list , Py_ssize_t index ) 戻り値: 借用参照。 次に属します: Stable ABI . Thread safety: Safe to call from multiple threads with external synchroniz ...
https://man.mtool.work/python/3.14/c-api/list.html
整数型オブジェクト (integer object) 12018
整数型オブジェクト (integer object) すべての整数は任意の長さをもつ "long" 整数として実装されます。 エラーが起きると、ほとんどの PyLong_As* API は (return type)-1 を返しますが、これは数値と見分けが付きません。 見分けを付けるためには PyErr_Oc ... * obj ) 次に属します: Stable ABI . obj を表す C の long を返します。 obj が PyLongObject のインスタンスでない場合、まず __index__() メソッド (存在する場合) を呼び出して PyLongObject に変換します。 もし obj の値が long の範囲外であれば、 OverflowError ... きたときに -1 を返します。 見分けを付けるためには PyErr_Occurred() を使ってください。 バージョン 3.8 で変更: 可能であれば __index__() を使うようになりました。 バージョン 3.10 で変更: この関数は __int__() を使わなくなりました。 long PyLong_AS_LONG ( PyO ... erflow ) 次に属します: Stable ABI . obj を表す C の long を返します。 obj が PyLongObject のインスタンスでない場合、まず __index__() メソッド (存在する場合) を呼び出して PyLongObject に変換します。 obj の値が LONG_MAX より大きい場合は *overflow に 1 、 ...
https://man.mtool.work/python/3.14/c-api/long.html
組み込み型 9772
組み込み型 以下のセクションでは、インタプリタに組み込まれている標準型について記述します。 主要な組み込み型は、数値、シーケンス、マッピング、クラス、インスタンス、および例外です。 コレクションクラスには、ミュータブルなものがあります。コレクシ ... thon オブジェクト x に対して、 float.from_number(x) は x.__float__() に委譲します。 __float__() が定義されていない場合、 __index__() へフォールバックします。 Added in version 3.14. float. as_integer_ratio ( ) 比が厳密に元の浮動小数点数であるような一対 ... します。 __complex__() が定義されていない場合は __float__() にフォールバックします。 __float__() も定義されていない場合は __index__() にフォールバックします。 Added in version 3.14. 数値型のハッシュ化 数 x と y に対して、型が異なっていたとしても、 x == ... 要素にアクセスします。インデックスは、仮に参照するシーケンスが変化したとしても前方 (または後方) に進み続けます。イテレータは IndexError または StopIteration に出会った場合 (またはインデックスがゼロより小さくなった場合) にのみ終了します。 注釈: in および ...
https://man.mtool.work/python/3.14/builtins/stdtypes.html
tkinter.ttk --- Tk のテーマ付きウィジェット 9462
tkinter.ttk --- Tk のテーマ付きウィジェット ソースコード: Lib/tkinter/ttk.py tkinter.ttk モジュールは、Tk 8.5 で導入されたテーマ付きウィジェット群を提供します。 外観が固定されている従来の tkinter ウィジェットと異なり、プラットフォームのネイ ... した cget() 、 configure() 、 identify() 、 instate() 、 state() と、 Entry から継承した bbox() 、 delete() 、 icursor() 、 index() 、 insert() 、 selection* 、 xview* に加え、 ttk.Combobox で説明するメソッドがあります。 オプション このウィジェットは以 ... トから1つ選んだときに仮想イベント <<ComboboxSelected>> を生成します。 ttk.Combobox class tkinter.ttk. Combobox current ( newindex = None ) newindex が指定されている場合、コンボボックスの値がドロップダウンリストの newindex の位置にある値に設定されます。 ... した cget() 、 configure() 、 identify() 、 instate() 、 state() と、 Entry から継承した bbox() 、 delete() 、 icursor() 、 index() 、 insert() 、 xview* に加え、 ttk.Spinbox で説明するメソッドがあります。 オプション このウィジェットは以下の固有のオプシ ...
https://man.mtool.work/python/3.14/library/tkinter.ttk.html
collections.abc --- コンテナの抽象基底クラス 9140
collections.abc --- コンテナの抽象基底クラス Added in version 3.3: 以前はこのモジュールは collections モジュールの一部でした。 ソースコード: Lib/_collections_abc.py このモジュールは、 抽象基底クラス を提供します。抽象基底クラスは、クラスが特 ... equence ): # 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 , value ): ... # O ... です: 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 ): ... # Mixin method def in ... ins__ , __iter__ , __len__ Sequence Reversible , Collection __getitem__ , __len__ __contains__ , __iter__ , __reversed__ , index , count MutableSequence Sequence __getitem__ , __setitem__ , __delitem__ , __len__ , insert Sequence から継承したメソッドと ...
https://man.mtool.work/python/3.14/library/collections.abc.html
traceback --- スタックトレースの表示または取得 9140
traceback --- スタックトレースの表示または取得 ソースコード: Lib/traceback.py このモジュールは、Python プログラムのスタックトレースを抽出、書式化、表示する標準的なインターフェースを提供します。 インタープリタのデフォルトのトレースバック表示 ... back def lumberjack (): bright_side_of_life () def bright_side_of_life (): return tuple ()[ 0 ] try : lumberjack () except IndexError as exc : print ( "*** print_tb:" ) traceback . print_tb ( exc . __traceback__ , limit = 1 , file = sys . stdout ) pri ... <module> lumberjack() ~~~~~~~~~~^^ File "<doctest...>", line 4, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ IndexError: tuple index out of range *** print_exc: Traceback (most recent call last): File "<doctest...>", line 10, in <module> ... lumberjack() ~~~~~~~~~~^^ File "<doctest...>", line 4, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ IndexError: tuple index out of range *** format_exc, first and last line: Traceback (most recent call last): IndexError: tuple i ...
https://man.mtool.work/python/3.14/library/traceback.html
What's New in Python 2.5 8662
What's New in Python 2.5 著者 : A.M. Kuchling この記事では Python 2.5 の新機能を説明します。 Python 2.5 の最終リリースは 2006 年 8 月に予定されており、 PEP 356 にリリース計画が記載されています。 Python 2.5 は 2006 年 9 月 19 日にリリースされ ... = [ 'OldPackage' ] download_url = ( 'http://www.example.com/pypackage/dist/pkg- %s .tar.gz' % VERSION ), ) Python Package Index ( https://pypi.org ) へのもう一つの新たな拡張は、パッケージについてのソースコードとバイナリアーカイブの保存についてです。新 ... サポートについてのセクションがあります。 参考 PEP 353 - 添え字型に ssize_t を使う PEP 著と実装 Martin von Löwis. PEP 357: '__index__' メソッド NumPy の開発者たちは、新しい特殊メソッド __index__() を追加する以外に解決できない問題に直面しました。 [start:s ... スで __int__() を使うと、浮動小数点数も有効なスライスのインデックスになってしまい、明らかに望ましくありません。 代わりに、 __index__() という新しい特殊メソッドが追加されました。 引数を取らず、スライスのインデックスとして使う整数を返します。 例えば次のよ ...
https://man.mtool.work/python/3.14/whatsnew/2.5.html
itertools --- 効率的なループ用のイテレータ生成関数群 8339
itertools --- 効率的なループ用のイテレータ生成関数群 このモジュールは イテレータ を構築する部品を実装しています。プログラム言語 APL, Haskell, SML からアイデアを得ていますが、 Python に適した形に修正されています。 このモジュールは、高速でメモ ... s() 、 sieve() のレシピで、その有用性を検証しています。 これらのレシピのほぼすべてと、さらに多くのレシピを、Python Package Index の more-itertools プロジェクトからインストールできます。 python - m pip install more - itertools 多くのレシピは、基盤となる ... alid_derangements = map ( all , have_moved ) return compress ( permutations ( seq , r = r ), valid_derangements ) def iter_index ( iterable , value , start = 0 , stop = None ): "シーケンスまたはイテラブル内で value が現れるインデックスを返す。" # iter ... _index('AABCADEAF', 'A') → 0 1 4 7 seq_index = getattr ( iterable , 'index' , None ) if seq_index is None : iterator = islice ( i ...
https://man.mtool.work/python/3.14/library/itertools.html
デザインと歴史 FAQ 8184
デザインと歴史 FAQ Python はなぜ文のグループ化にインデントを使うのですか? Guido van Rossum の信じるところによれば、インデントによるグループ化は非常にエレガントで、普通の Python プログラムを大いに読みやすくします。しばらくすればほとんどの人は ... le chunk := fp . read ( 200 ): print ( chunk ) より詳しくは PEP 572 を参照してください。 Python にメソッドを使う機能 (list.index() 等) と関数を使う機能 (len(list) 等) があるのはなぜですか? Guidoいわく: (a) 幾つかの演算では、接頭辞は接尾辞よりも単純に ... 類する言語の機能の一番の利点 (コード量の削減) は、 Python では代入により簡単に手に入れられます: function ( args ) . mydict [ index ][ index ] . a = 21 function ( args ) . mydict [ index ][ index ] . b = 42 function ( args ) . mydict [ index ][ index ] . ... c = 63 こう書いてください: ref = function ( args ) . mydict [ index ][ index ] ref . a = 21 ref . b = 42 ref . c = 63 Python では実行時に名前束縛が解決され、後者はその解決が一度で済むため、こ ...
https://man.mtool.work/python/3.14/faq/design.html
array --- 効率的な数値配列 8016
array --- 効率的な数値配列 This module defines an object type which can compactly represent an array of basic values: characters, integers, floating-point numbers. Arrays are mutable sequence types and behave very much like lists, except th ... を送出します。 他の型の配列に Unicode データを追加するには、 array.frombytes(unicodestring.encode(enc)) を使ってください。 index ( value [ , start [ , stop ] ] ) 配列内で value が最初に出現するインデックス i (つまり、該当する最小の i ) を返します。 省 ... なければ ValueError を送出します。 バージョン 3.10 で変更: 省略可能な start と stop パラメーターが追加されました。 insert ( index , value , / ) 配列の index が示す位置の直前に、新しい要素 value を挿入します。 負のインデックスは配列の末尾からの相対位置と ... して扱われます。 pop ( index = -1 , / ) アレイからインデクスが i の要素を取り除いて返します。オプションの引数はデフォルトで -1 になっていて、最後の要素 ...
https://man.mtool.work/python/3.14/library/array.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT