Results of 1 - 10 of about 79 for items (0.006 sec.)
- operator --- 関数形式の標準演算子 13090
- operator --- 関数形式の標準演算子 ソースコード: Lib/operator.py operator モジュールは、Python の組み込み演算子に対応する効率的な関数を提供します。 例えば、 operator.add(x, y) は式 x+y と同等です。 多くの関数名は、特殊メソッドの名前から二重ア
...st', 'name.last') とした後で、 f(b) を呼び出すと (b.name.first, b.name.last) を返します。 次と等価です: def attrgetter ( * items ): if any ( not isinstance ( item , str ) for item in items ): raise TypeError ( 'attribute name must be a string' ) if le...n ( items ) == 1 : attr = items [ 0 ] def g ( obj ): return resolve_attr ( obj , attr ) else : def g ( obj ): return tuple ( resolve..._attr ( obj , attr ) for attr in items ) return g def resolve_attr ( obj , attr ): for name in attr . split ( "." ): obj = getattr ( obj , name ) return obj oper... - https://man.mtool.work/python/3.14/library/operator.html
- 引数の解釈と値の構築 12225
- 引数の解釈と値の構築 これらの関数は、独自の拡張関数やメソッドを作成するときに便利です。 追加の情報や例は Python インタプリタの拡張と埋め込み を参照してください。 最初に説明する 3 つの関数、 PyArg_ParseTuple() , PyArg_ParseTupleAndKeywords()
...受け付けます。 Pythonが値の真偽をどのように判定するかを知りたければ、 真理値判定 を参照してください。 Added in version 3.3. (items) (シーケンス) [ matching-items ] オブジェクトは、長さが items 内の書式単位の数と等しい Python のシーケンスでなければなりま...せん ( str 、 bytes 、 bytearray は除きます)。 C の引数は items 内の各書式単位に対応している必要があります。 シーケンスの書式単位はネストできます。 items に 借用バッファ ( s 、 s# 、 z 、...借用参照 ( S 、 Y 、 U 、 O 、 O! ) を格納する書式単位が含まれる場合、オブジェクトは Python のタプルでなければなりません。 items 内の O& 書式単位の converter は、借用バッファや借用参照を格納してはいけません。 バージョン 3.14 で変更: str と bytearray オ... - https://man.mtool.work/python/3.14/c-api/arg.html
- tkinter.ttk --- Tk のテーマ付きウィジェット 11359
- tkinter.ttk --- Tk のテーマ付きウィジェット ソースコード: Lib/tkinter/ttk.py tkinter.ttk モジュールは、Tk 8.5 で導入されたテーマ付きウィジェット群を提供します。 外観が固定されている従来の tkinter ウィジェットと異なり、プラットフォームのネイ
...新しいウィジェットオプションとして、 selecttype ( "item" または "cell" の選択)、 striped (行の縞模様)、 titlecolumns / titleitems (スクロールしても固定されるカラムや行) を導入しました。 カラムには separator オプション、要素には hidden オプションが加わり...ル単位で表したものです。 ツリーカラムの設定を行うには、 column = "#0" を付けてこのメソッドを呼び出してください。 delete ( * items ) 指定された items とその子孫たち全てを削除します。 ルート要素は削除できません。 detach ( * items ) 指定された items を全て...tion() は引数を受け取らなくなりました。 選択状態を変更するには、以下の選択用メソッドを使用してください。 selection_set ( * items ) 新しく選択状態の要素が items になります。 バージョン 3.6 で変更: items は 1 つのタプルとしてだけでなく、別々の引数として... - https://man.mtool.work/python/3.14/library/tkinter.ttk.html
- collections --- コンテナデータ型 10494
- collections --- コンテナデータ型 ソースコード: Lib/collections/__init__.py このモジュールは、汎用の Python 組み込みコンテナ dict , list , set , および tuple に代わる、特殊なコンテナデータ型を実装しています。 namedtuple() 名前付きフィールドを
...ment ( '-c' , '--color' ) namespace = parser . parse_args () command_line_args = { k : v for k , v in vars ( namespace ) . items () if v is not None } combined = ChainMap ( command_line_args , os . environ , defaults ) print ( combined [ 'color' ]) pr...om current context list ( d ) # All nested values k in d # Check all nested values len ( d ) # Number of nested values d . items () # All nested items dict ( d ) # Flatten into a regular dictionary ChainMap クラスは、探索はチェーン全体に対して行います...# すべてのカウントをリセット list ( c ) # 重複しない要素のリスト set ( c ) # 集合に変換 dict ( c ) # 通常の辞書に変換 c . items () # (elem, cnt) のペアにアクセス Counter ( dict ( list_of_pairs )) # (elem, cnt) のペアのリストから変換 c . most_common (... - https://man.mtool.work/python/3.14/library/collections.html
- types --- 動的な型生成と組み込み型の名前 9203
- types --- 動的な型生成と組み込み型の名前 ソースコード: Lib/types.py このモジュールは新しい型の動的な生成を支援するユーティリティ関数を定義します。 さらに、標準の Python インタプリタによって使用されているものの、 int や str のように組み込みと
...ult が与えられない場合は、デフォルト値の None になります。そのため、このメソッドが KeyError を発生させることはありません。 items ( ) 元になったマッピングの items ( (key, value) ペアの列) に対する新しいビューを返します。 keys ( ) 元になったマッピングの..., ** kwargs ): self . __dict__ . update ( mapping_or_iterable ) self . __dict__ . update ( kwargs ) def __repr__ ( self ): items = ( f " { k } = { v !r} " for k , v in self . __dict__ . items ()) return " {} ( {} )" . format ( type ( self ) . __name__..., ", " . join ( items )) def __eq__ ( self , other ): if isinstance ( self , SimpleNamespace ) and isinstance ( other , SimpleNamespace ): retur... - https://man.mtool.work/python/3.14/library/types.html
- Python 初期化設定 8997
- Python 初期化設定 PyInitConfig C API Added in version 3.14. Python は Py_InitializeFromInitConfig() で初期化できます。 Py_RunMain() 関数は、カスタマイズされた Python プログラムを書くために使用できます。 Initialization, Finalization, and Thr
...なければなりません。 int PyInitConfig_GetStrList ( PyInitConfig * config , const char * name , size_t * length , char * * * items ) 文字列リストの設定オプションを、null 終端の UTF-8 エンコード文字列の配列として取得します。 Set *length and *items , and...return 0 on success. エラー時は config にエラーを設定し、 -1 を返します。 成功時は、 PyInitConfig_FreeStrList(length, items) で文字列リストを解放しなければなりません。 void PyInitConfig_FreeStrList ( size_t length , char * * items ) PyInitConfig_...、 -1 を返します。 int PyInitConfig_SetStrList ( PyInitConfig * config , const char * name , size_t length , char * const * items ) 文字列リストの設定オプションを、null 終端の UTF-8 エンコード文字列の配列で設定します。 文字列リストはコピーされます。 成... - https://man.mtool.work/python/3.14/c-api/init_config.html
- スレッドセーフ性の保証 8131
- スレッドセーフ性の保証 このページでは、Python のフリースレッドビルドにおける組み込み型のスレッドセーフ性の保証を説明します。 ここで説明する保証は、 GIL を無効にして Python を使う場合 (フリースレッドモード) に適用されます。 GIL が有効な場合、
...する d . keys () # 新しい dict_keys ビューオブジェクトを返す d . values () # 新しい dict_values ビューオブジェクトを返す d . items () # 新しい dict_items ビューオブジェクトを返す clear() メソッドは、処理中ずっとロックを保持します。 ほかのスレッドから、要...認してから実行 (TOCTOU) if key in d : del d [ key ] # スレッドセーフではない: 変更中のイテレーション for key , value in d . items (): process ( key ) # ほかのスレッドが d を変更する可能性がある 確認から使用までの間に状態が変わる問題 (TOCTOU: time-of-ch...ートするには、コピーをイテレートしてください。 # 安全にイテレートするためにコピーを作成する for key , value in d . copy () . items (): process ( key ) スレッド間で dict インスタンスを共有する場合は、外部での同期を検討してください。 set オブジェクトのスレ... - https://man.mtool.work/python/3.14/builtins/threadsafety.html
- C API Stability 8131
- C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修
...eases from python.org and many third-party distributors. 限定版APIの内容 Currently, the Limited API includes the following items: METH_CLASS METH_COEXIST METH_FASTCALL METH_METHOD METH_NOARGS METH_O METH_STATIC METH_VARARGS PY_VECTORCALL_ARGUMENTS_OFF...x_RealAsDouble() PyComplex_Type PyDescr_NewClassMethod() PyDescr_NewGetSet() PyDescr_NewMember() PyDescr_NewMethod() PyDictItems_Type PyDictIterItem_Type PyDictIterKey_Type PyDictIterValue_Type PyDictKeys_Type PyDictProxy_New() PyDictProxy_Type PyDict...y_Type PyDictRevIterValue_Type PyDictValues_Type PyDict_Clear() PyDict_Contains() PyDict_Copy() PyDict_DelItem() PyDict_DelItemString() PyDict_GetItem() PyDict_GetItemRef() PyDict_GetItemString() PyDict_GetItemStringRef() PyDict_GetItemWithError() PyD... - https://man.mtool.work/python/3.14/c-api/stable.html
- math --- 数学関数 7912
- math --- 数学関数 このモジュールは、C 標準で定義されたものを含む、一般的な数学関数と定数を提供します。 これらの関数で複素数を使うことはできません。複素数に対応する必要があるならば、 cmath モジュールにある同じ名前の関数を使ってください。ほと
...283185... inf 正の無限大 nan 非数 "Not a number" (NaN) 数論関数 math. comb ( n , k ) Return the number of ways to choose k items from n items without repetition and without order. Evaluates to n! / (k! * (n - k)!) when k <= n and evaluates to zero whe...cm() without arguments returns 1 . Added in version 3.9. math. perm ( n , k = None ) Return the number of ways to choose k items from n items without repetition and with order. Evaluates to n! / (n - k)! when k <= n and evaluates to zero when k > n .... - https://man.mtool.work/python/3.14/library/math.html
- wsgiref --- WSGI ユーティリティとリファレンス実装 7912
- wsgiref --- WSGI ユーティリティとリファレンス実装 ソースコード: Lib/wsgiref 警告 wsgiref はリファレンス実装であり、本番環境での使用は推奨されません。 このモジュールは基本的なセキュリティ検査だけを実装しています。 Web Server Gateway Interfac
...response ( status , headers ) ret = [( " %s : %s \n " % ( key , value )) . encode ( "utf-8" ) for key , value in environ . items ()] return ret with make_server ( '' , 8000 , simple_app ) as httpd : print ( "Serving on port 8000..." ) httpd . serve_fo...、存在しないヘッダの取得は None を返し、存在しないヘッダの削除は何もしません。 Headers オブジェクトは keys() 、 values() 、 items() メソッドもサポートします。複数の値を持つヘッダがある場合には、 keys() と items() で返されるリストは同じキーを一つ以上含む...ことがあります。 Headers オブジェクトの len() は、その items() の長さと同じであり、ラップされたヘッダリストの長さと同じです。実際、 items() メソッドは単にラップされたヘッダリストのコピ... - https://man.mtool.work/python/3.14/library/wsgiref.html