Results of 1 - 10 of about 115 for total (0.010 sec.)
- キュー — Python 3.14.8 ドキュメント 11426
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » キュー テーマ 自動 ライト ダーク | キュー ¶ ソースコード: Lib/asyncio/q
...hat we will use to store our "workload". queue = asyncio . Queue () # Generate random timings and put them into the queue. total_sleep_time = 0 for _ in range ( 20 ): sleep_for = random . uniform ( 0.05 , 1.0 ) total_sleep_time += sleep_for queue . pu...tasks . append ( task ) # Wait until the queue is fully processed. started_at = time . monotonic () await queue . join () total_slept_for = time . monotonic () - started_at # Cancel our worker tasks. for task in tasks : task . cancel () # Wait until...wait asyncio . gather ( * tasks , return_exceptions = True ) print ( '====' ) print ( f '3 workers slept in parallel for { total_slept_for : .2f } seconds' ) print ( f 'total expected sleep time: { total_sleep_time : .2f } seconds' ) asyncio . run ( m... - https://man.mtool.work/python/3.14/library/asyncio-queue.html
- キュー — Python 3.14.8 ドキュメント 10522
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » キュー テーマ 自動 ライト ダーク | キュー ¶ ソースコード: Lib/asyncio/q
...hat we will use to store our "workload". queue = asyncio . Queue () # Generate random timings and put them into the queue. total_sleep_time = 0 for _ in range ( 20 ): sleep_for = random . uniform ( 0.05 , 1.0 ) total_sleep_time += sleep_for queue . pu...tasks . append ( task ) # Wait until the queue is fully processed. started_at = time . monotonic () await queue . join () total_slept_for = time . monotonic () - started_at # Cancel our worker tasks. for task in tasks : task . cancel () # Wait until...wait asyncio . gather ( * tasks , return_exceptions = True ) print ( '====' ) print ( f '3 workers slept in parallel for { total_slept_for : .2f } seconds' ) print ( f 'total expected sleep time: { total_sleep_time : .2f } seconds' ) asyncio . run ( m... - https://man.mtool.work/python/3.14/library/asyncio-queue.html
- tracemalloc --- メモリ割り当ての追跡 — Python 3.14.8 ドキュメント 10333
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Debugging and Profiling » tracemalloc --- メモリ割り当ての追跡 テーマ 自動 ライト ダーク | tracemalloc --- メモリ割り当ての追跡 ¶ A
...:] if other : size = sum ( stat . size for stat in other ) print ( " %s other: %.1f KiB" % ( len ( other ), size / 1024 )) total = sum ( stat . size for stat in top_stats ) print ( "Total allocated size: %.1f KiB" % ( total / 1024 )) tracemalloc . sta...a = set () #10: Lib/base64.py:142: 59.8 KiB _b32tab2 = [ a + b for a in _b32tab for b in _b32tab ] 6220 other : 3602.8 KiB Total allocated size : 5303.1 KiB オプションの詳細については Snapshot.statistics() を参照してください。 Record the current and p...ームのみを保存します、つまり上限は 1 です。 nframe は 1 以上でなければなりません。 You can still read the original number of total frames that composed the traceback by looking at the Traceback.total_nframe attribute. 1 より多くのフレームを保存するのは... - https://man.mtool.work/python/3.14/library/tracemalloc.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 10333
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...and vice versa. typing. Required ¶ Special typing construct to mark a TypedDict key as required. This is mainly useful for total=False TypedDicts. See TypedDict and PEP 655 for more details. Added in version 3.11. typing. NotRequired ¶ Special typing...# This would also be fine pass class Height : ... class Width : ... float_array_1d : Array [ float , Height ] = Array () # Totally fine int_array_2d : Array [ int , Height , Width ] = Array () # Yup, fine too However, note that at most one type variab...TypedDict can have the label key omitted. It is also possible to mark all keys as non-required by default by specifying a totality of False : class Point2D ( TypedDict , total = False ): x : int y : int # Alternative syntax Point2D = TypedDict ( 'Poi... - https://man.mtool.work/python/3.14/library/typing.html
- tracemalloc --- メモリ割り当ての追跡 — Python 3.14.8 ドキュメント 10333
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Debugging and Profiling » tracemalloc --- メモリ割り当ての追跡 テーマ 自動 ライト ダーク | tracemalloc --- メモリ割り当ての追跡 ¶ A
...:] if other : size = sum ( stat . size for stat in other ) print ( " %s other: %.1f KiB" % ( len ( other ), size / 1024 )) total = sum ( stat . size for stat in top_stats ) print ( "Total allocated size: %.1f KiB" % ( total / 1024 )) tracemalloc . sta...a = set () #10: Lib/base64.py:142: 59.8 KiB _b32tab2 = [ a + b for a in _b32tab for b in _b32tab ] 6220 other : 3602.8 KiB Total allocated size : 5303.1 KiB オプションの詳細については Snapshot.statistics() を参照してください。 Record the current and p...ームのみを保存します、つまり上限は 1 です。 nframe は 1 以上でなければなりません。 You can still read the original number of total frames that composed the traceback by looking at the Traceback.total_nframe attribute. 1 より多くのフレームを保存するのは... - https://man.mtool.work/python/3.14/library/tracemalloc.html
- typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 10333
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース
...and vice versa. typing. Required ¶ Special typing construct to mark a TypedDict key as required. This is mainly useful for total=False TypedDicts. See TypedDict and PEP 655 for more details. Added in version 3.11. typing. NotRequired ¶ Special typing...# This would also be fine pass class Height : ... class Width : ... float_array_1d : Array [ float , Height ] = Array () # Totally fine int_array_2d : Array [ int , Height , Width ] = Array () # Yup, fine too However, note that at most one type variab...TypedDict can have the label key omitted. It is also possible to mark all keys as non-required by default by specifying a totality of False : class Point2D ( TypedDict , total = False ): x : int y : int # Alternative syntax Point2D = TypedDict ( 'Poi... - https://man.mtool.work/python/3.14/library/typing.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 8525
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...s from other binary functions. The function defaults to addition. The function should accept two arguments, an accumulated total and a value from the iterable . If an initial value is provided, the accumulation will start with that value and the outpu...terable. およそ次と等価です: def accumulate ( iterable , function = operator . add , * , initial = None ): 'Return running totals' # accumulate([1,2,3,4,5]) → 1 3 6 10 15 # accumulate([1,2,3,4,5], initial=100) → 100 101 103 106 110 115 # accumulate([1...,2,3,4,5], operator.mul) → 1 2 6 24 120 iterator = iter ( iterable ) total = initial if initial is None : try : total = next ( iterator ) except StopIteration : return yield total for element in it... - https://man.mtool.work/python/3.14/library/itertools.html
- itertools --- 効率的なループ用のイテレータ生成関数群 — Python 3.14.8 ドキュメン... 8525
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » itertools --- 効率的なループ用のイテレータ生成関数群 テーマ 自動 ライト ダーク | itertools --- 効
...s from other binary functions. The function defaults to addition. The function should accept two arguments, an accumulated total and a value from the iterable . If an initial value is provided, the accumulation will start with that value and the outpu...terable. およそ次と等価です: def accumulate ( iterable , function = operator . add , * , initial = None ): 'Return running totals' # accumulate([1,2,3,4,5]) → 1 3 6 10 15 # accumulate([1,2,3,4,5], initial=100) → 100 101 103 106 110 115 # accumulate([1...,2,3,4,5], operator.mul) → 1 2 6 24 120 iterator = iter ( iterable ) total = initial if initial is None : try : total = next ( iterator ) except StopIteration : return yield total for element in it... - https://man.mtool.work/python/3.14/library/itertools.html
- はじめに — Python 3.14.8 ドキュメント 8174
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » はじめに テーマ 自動 ライト ダーク | はじめに ¶ Python のアプリケーションプログラマ用インタフェース (Application Programmer's Int
...を使っていて、もう一つは PySequence_GetItem() を使っています。 long sum_list ( PyObject * list ) { Py_ssize_t i , n ; long total = 0 , value ; PyObject * item ; n = PyList_Size ( list ); if ( n < 0 ) return -1 ; /* Not a list */ for ( i = 0 ; i < n ;...ong_AsLong ( item ); if ( value == -1 && PyErr_Occurred ()) /* Integer too big to fit in a C long, bail out */ return -1 ; total += value ; } return total ; } long sum_sequence ( PyObject * sequence ) { Py_ssize_t i , n ; long total = 0 , value ; PyOb...Py_DECREF ( item ); if ( value == -1 && PyErr_Occurred ()) /* Integer too big to fit in a C long, bail out */ return -1 ; total += value ; } else { Py_DECREF ( item ); /* Discard reference ownership */ } } return total ; } 型 ¶ 他にも Python/C API に... - https://man.mtool.work/python/3.14/c-api/intro.html
- はじめに — Python 3.14.8 ドキュメント 8174
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » はじめに テーマ 自動 ライト ダーク | はじめに ¶ Python のアプリケーションプログラマ用インタフェース (Application Programmer's Int
...を使っていて、もう一つは PySequence_GetItem() を使っています。 long sum_list ( PyObject * list ) { Py_ssize_t i , n ; long total = 0 , value ; PyObject * item ; n = PyList_Size ( list ); if ( n < 0 ) return -1 ; /* Not a list */ for ( i = 0 ; i < n ;...ong_AsLong ( item ); if ( value == -1 && PyErr_Occurred ()) /* Integer too big to fit in a C long, bail out */ return -1 ; total += value ; } return total ; } long sum_sequence ( PyObject * sequence ) { Py_ssize_t i , n ; long total = 0 , value ; PyOb...Py_DECREF ( item ); if ( value == -1 && PyErr_Occurred ()) /* Integer too big to fit in a C long, bail out */ return -1 ; total += value ; } else { Py_DECREF ( item ); /* Discard reference ownership */ } } return total ; } 型 ¶ 他にも Python/C API に... - https://man.mtool.work/python/3.14/c-api/intro.html