Results of 1 - 10 of about 18 for Collection (0.007 sec.)
- collections.abc --- コンテナの抽象基底クラス 14310
- collections.abc --- コンテナの抽象基底クラス Added in version 3.3: 以前はこのモジュールは collections モジュールの一部でした。 ソースコード: Lib/_collections_abc.py このモジュールは、 抽象基底クラス を提供します。抽象基底クラスは、クラスが特
...] をサポートするようになりました。 ジェネリックエイリアス型 および PEP 585 を参照してください。 コレクション抽象基底クラス collections モジュールは以下の ABC (抽象基底クラス) を提供します: ABC 継承しているクラス 抽象メソッド mixin メソッド Container [ 1 ]...__reversed__ Generator [ 1 ] Iterator send , throw close , __iter__ , __next__ Sized [ 1 ] __len__ Callable [ 1 ] __call__ Collection [ 1 ] Sized , Iterable , Container __contains__ , __iter__ , __len__ Sequence Reversible , Collection __getitem__ , __len_...r , reverse , extend , pop , remove , __iadd__ ByteString Sequence __getitem__ , __len__ Sequence から継承したメソッド Set Collection __contains__ , __iter__ , __len__ __le__ , __lt__ , __eq__ , __ne__ , __gt__ , __ge__ , __and__ , __or__ , __sub__ , __rsu... - https://man.mtool.work/python/3.14/library/collections.abc.html
- A Conceptual Overview of asyncio 11221
- A Conceptual Overview of asyncio この HOWTO では、 asyncio の基本的な仕組みをしっかり理解できるように説明します。 推奨される書き方がどのように動き、なぜ推奨されるのかを理解する助けになるでしょう。 asyncio の主要な概念について、疑問を持ってい
...things done comes from the respect and cooperation of its worker bees. In more technical terms, the event loop contains a collection of jobs to be run. Some jobs are added directly by you, and some indirectly by asyncio . The event loop takes a job from i...l to the event loop. The event loop will then select another job from its pool and invoke it. You can roughly think of the collection of jobs as a queue: jobs are added and then processed one at a time, generally (but not always) in order. This process rep...ンはコルーチンオブジェクト、より正確には types.CoroutineType のインスタンス (ネイティブコルーチン) を指します。 コルーチンは collections.abc.Coroutine のインスタンスとして存在することもあります。 この違いは型チェックで重要になります。 コルーチンは関数の本体、... - https://man.mtool.work/python/3.14/howto/a-conceptual-overview-of-asyncio.html
- typing --- 型ヒントのサポート 9848
- typing --- 型ヒントのサポート Added in version 3.5. ソースコード: Lib/typing.py 注釈 Python ランタイムは、関数や変数の型アノテーションを強制しません。型アノテーションは、 type checkers や IDE、linterなどのサードパーティーツールで使われます。
...。 new_vector = scale ( 2.0 , [ 1.0 , - 4.2 , 5.4 ]) 型エイリアスは複雑な型シグネチャを単純化するのに有用です。例えば: from collections.abc import Sequence type ConnectionOptions = dict [ str , str ] type Address = tuple [ str , int ] type Server = tuple [...マンスが Python 3.9 のレベルに戻りました 呼び出し可能オブジェクトのアノテーション 関数や他の 呼び出し可能 オブジェクトには、 collections.abc.Callable または非推奨の typing.Callable を使ってアノテーションできます。 Callable[[int], str] は、 int 型の引数を 1 つ...取り、 str を返す関数を表します。 例えば: from collections.abc import Callable , Awaitable def feeder ( get_next_item : Callable [[], str ]) -> None : ... # Body def async_query (... - https://man.mtool.work/python/3.14/library/typing.html
- gc --- ガベージコレクターインターフェース 9505
- gc --- ガベージコレクターインターフェース このモジュールは、循環ガベージコレクタの無効化・検出頻度の調整・デバッグオブションの設定などを行うインターフェースを提供します。また、検出した到達不能オブジェクトのうち、解放する事ができないオブジェ
...世代ぶんのリストを返します。キーの数は将来変わるかもしれませんが、現在のところそれぞれの辞書には以下の項目が含まれています: collections は、この世代が検出を行った回数です; collected は、この世代内で回収されたオブジェクトの総数です; uncollectable is the tota...ess memory usage is also checked before running the collector. If the memory usage has not increased by 10% since the last collection and the net number of object allocations has not exceeded 40 times threshold0 , the collection is not run. See Garbage col... - https://man.mtool.work/python/3.14/library/gc.html
- 拡張モジュールの定義 8819
- 拡張モジュールの定義 A C extension for CPython is a shared library (for example, a .so file on Linux, .pyd DLL on Windows), which is loadable into the Python process (for example, it is compiled with compatible compiler settings), and which
...object is created, and typically populated with fresh method and type objects. The old module is subject to normal garbage collection. This mirrors the behavior of pure-Python modules. サブインタープリタ 内や、Python ランタイムの再初期化 ( Py_Finalize() と... - https://man.mtool.work/python/3.14/c-api/extension-modules.html
- What's New In Python 3.6 8476
- What's New In Python 3.6 エディタ : Elvis Pranskevichus < elvis @ magic . io >, Yury Selivanov < yury @ magic . io > この記事では 3.5 と比較した Python 3.6 の新機能を解説します。 Python 3.6 は2016年12月23日にリリースされました。 全詳細につい
...th.nan 。複素数の repr が使用する書式に対応する cmath.infj と cmath.nanj 。 (Contributed by Mark Dickinson in bpo-23229 .) collections サイズを持つ反復可能なコンテナクラスを表す抽象基底クラス Collection が追加されました。 (Contributed by Ivan Levkivskyi, d...tuple() の verbose と rename 引数がキーワード専用になりました。 (Contributed by Raymond Hettinger in bpo-25628 .) 再帰的な collections.deque インスタンスを pickle 化できるようになりました。 (Contributed by Serhiy Storchaka in bpo-26482 .) concurrent.future....AbstractContextManager を表す typing.ContextManager クラスが追加されました。 (Contributed by Brett Cannon in bpo-25609 .) collections.abc.Collection を表す typing.Collection クラスが追加されました。 (Contributed by Ivan Levkivskyi in bpo-27598 .) クラス変... - https://man.mtool.work/python/3.14/whatsnew/3.6.html
- 1. Extending Python with C or C++ 8133
- 1. Extending Python with C or C++ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in objec
...最後の参照が削除されたことになり、オブジェクトは解放されます。 別の方法として、自動ガベージコレクション ( automatic garbage collection ) があります。 (参照カウント法もガベージコレクションの方法と呼ばれることがあるため、両者を区別するために「自動」と付けてい...が他の拡張モジュールでも便利なことがあります。例えば、あるモジュールでは順序概念のないリストのように動作する "コレクション (collection)" クラスを実装しているかもしれません。ちょうどリストを生成したり操作したりできる C API を備えた標準の Python リスト型のよう... - https://man.mtool.work/python/3.14/extending/extending.html
- 11. 標準ライブラリをひとめぐり --- その II 8133
- 11. 標準ライブラリをひとめぐり --- その II ツアーの第2部では、プロフェッショナルプログラミングを支えるもっと高度なモジュールをカバーします。ここで挙げるモジュールは、小さなスクリプトの開発ではほとんど使いません。 11.1. 出力のフォーマット re
...imary' ] # fetch the object if it is still alive 10 >>> del a # remove the one reference >>> gc . collect () # run garbage collection right away 0 >>> d [ 'primary' ] # entry was automatically removed Traceback (most recent call last): File "<stdin>" , lin...import array >>> a = array ( 'H' , [ 4000 , 10 , 700 , 22222 ]) >>> sum ( a ) 26932 >>> a [ 1 : 3 ] array('H', [10, 700]) collections モジュールでは、 deque オブジェクトを提供しています。リスト型に似ていますが、データの追加と左端からの取り出しが速く、その...一方で中間にある値の参照は遅くなります。こうしたオブジェクトはキューや木構造の幅優先探索の実装に向いています: >>> from collections import deque >>> d = deque ([ "task1" , "task2" , "task3" ]) >>> d . append ( "task4" ) >>> print ( "Handling" , d . popl... - https://man.mtool.work/python/3.14/tutorial/stdlib2.html
- メモリ管理 7789
- メモリ管理 概要 Python におけるメモリ管理には、全ての Python オブジェクトとデータ構造が入ったプライベートヒープ (private heap) が必須です。プライベートヒープの管理は、内部的には Python メモリマネージャ (Python memory manager) が確実に行いま
...sequently, under certain circumstances, the Python memory manager may or may not trigger appropriate actions, like garbage collection, memory compaction or other preventive procedures. Note that by using the C library allocator as shown in the previous exa... - https://man.mtool.work/python/3.14/c-api/memory.html
- weakref --- 弱参照 7789
- weakref --- 弱参照 ソースコード: Lib/weakref.py weakref モジュールを使うと、Python プログラムからオブジェクトへの 弱参照 を作成できます。 以下では、用語リファレント( referent ) は弱参照が参照するオブジェクトを意味します。 オブジェクトへの弱
...参照があることは、そのオブジェクトを生かしておくのには不十分です。リファレントへの参照が弱参照しか残っていない場合、 garbage collection はリファレントを自由に破棄し、メモリを別のものに再利用することができます。しかし、オブジェクトへの強参照がなくても、オブジ... - https://man.mtool.work/python/3.14/library/weakref.html