Results of 1 - 10 of about 63 for collections (0.010 sec.)
- collections.abc --- コンテナの抽象基底クラス 15268
- collections.abc --- コンテナの抽象基底クラス Added in version 3.3: 以前はこのモジュールは collections モジュールの一部でした。 ソースコード: Lib/_collections_abc.py このモジュールは、 抽象基底クラス を提供します。抽象基底クラスは、クラスが特
...] をサポートするようになりました。 ジェネリックエイリアス型 および PEP 585 を参照してください。 コレクション抽象基底クラス collections モジュールは以下の ABC (抽象基底クラス) を提供します: ABC 継承しているクラス 抽象メソッド mixin メソッド Container [ 1 ] _...) かどうかを確認する唯一の信頼できる方法は iter(obj) を呼び出すことです。 コレクションの抽象基底クラス -- 詳細な説明 class collections.abc. Container __contains__() メソッドを提供するクラスの ABC です。 class collections.abc. Hashable __hash__() メソッドを提...供するクラスの ABC です。 class collections.abc. Sized __len__() メソッドを提供するクラスの ABC です。 class collections.abc. Callable __call__() メソッドを提供するク... - https://man.mtool.work/python/3.14/library/collections.abc.html
- typing --- 型ヒントのサポート 13582
- 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 [ A...マンスが 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 ( o... - https://man.mtool.work/python/3.14/library/typing.html
- collections --- コンテナデータ型 9621
- collections --- コンテナデータ型 ソースコード: Lib/collections/__init__.py このモジュールは、汎用の Python 組み込みコンテナ dict , list , set , および tuple に代わる、特殊なコンテナデータ型を実装しています。 namedtuple() 名前付きフィールドを
...() を繰り返すよりも早いです。 このクラスはネストされたスコープをシミュレートするのに使え、テンプレート化に便利です。 class collections. ChainMap ( * maps ) ChainMap は、複数の辞書やその他のマッピングをまとめて、一つの、更新可能なビューを作成します。 maps が...d', 966), ('to', 762), ('of', 669), ('i', 631), ('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)] class collections. Counter ( ** kwargs ) class collections. Counter ( iterable , / , ** kwargs ) class collections. Counter ( mapping , / ,...してください: map ( Counter , combinations_with_replacement ( 'ABC' , 2 )) # --> AA AB AC BB BC CC deque オブジェクト class collections. deque ( [ iterable [ , maxlen ] ] ) iterable で与えられるデータから、新しい deque オブジェクトを ( append() をつかって) 左... - https://man.mtool.work/python/3.14/library/collections.html
- Python 3.17 で削除予定 8786
- Python 3.17 で削除予定 collections.abc : collections.abc.ByteString は Python 3.17 で削除予定です。 実行時に obj が バッファプロトコル を実装しているか調べるには、 isinstance(obj, collections.abc.Buffer) を使ってください。 型アノテーションに
...yteString は、Python 3.17 で削除予定です。 実行時に obj が バッファプロトコル を実装しているか調べるには、 isinstance(obj, collections.abc.Buffer) を使ってください。 型アノテーションには Buffer を使うか、コードが対応する型を明示したユニオン (例えば bytes |... - https://man.mtool.work/python/3.14/deprecations/pending-removal-in-3.17.html
- 開発ツール 8094
- 開発ツール この章で紹介されるモジュールはソフトウェアを書くことを支援します。たとえば、 pydoc モジュールはモジュールの内容からドキュメントを生成します。 doctest と unittest モジュールでは、自動的に実行して予想通りの出力が生成されるか確認する
...抽象基底クラスとプロトコル 関数とデコレータ イントロスペクション用のヘルパー 定数 非推奨のエイリアス 組み込み型のエイリアス collections の型のエイリアス その他の具象型のエイリアス collections.abc のコンテナ抽象基底クラスのエイリアス collections.abc の非同期処...理用の抽象基底クラスのエイリアス collections.abc のその他の抽象基底クラスのエイリアス contextlib の抽象基底クラスのエイリアス メジャーな機能の非推奨時系列 pydoc --- ド... - https://man.mtool.work/python/3.14/library/development.html
- Python ドキュメントの目次 8022
- Python ドキュメントの目次 What's New in Python What's new in Python 3.14 概要 -- リリースハイライト 新しい機能 PEP 649 と PEP 749 : アノテーションの遅延評価 PEP 734 : 複数インタープリタ機能が標準ライブラリに追加 PEP 750 : テンプレート文字列
...他の言語変更 新たなモジュール 改良されたモジュール asyncio argparse array asynchat, asyncore, smtpd base64 bdb bisect codecs collections.abc contextlib curses データクラス __slots__ キーワード専用フィールド distutils doctest エンコーディング enum fileinput fa...Python 3.9.1 での重要な変更点 typing macOS 11.0 (Big Sur) と Appleシリコンの Mac のサポート Python 3.9.2 での重要な変更点 collections.abc urllib.parse Python 3.9.3 での重要な変更点 Python 3.9.5での重要な変更点 urllib.parse 3.9.14 の注目すべきセキュリティ機...ロトコルバージョン 5 による帯域外データバッファ その他の言語変更 新たなモジュール 改良されたモジュール ast asyncio builtins collections cProfile csv curses ctypes datetime functools gc gettext gzip IDLE と idelelib inspect io itertools json.tool logging math... - https://man.mtool.work/python/3.14/contents.html
- What's New In Python 3.2 7950
- What's New In Python 3.2 著者 : Raymond Hettinger この記事では Python 3.1 と比較した Python 3.2 の新機能を説明します。 Python 3.2 は 2011 年 2 月 20 日にリリースされました。 主な変更点をいくつか取り上げ、例を示します。 すべての詳細については
...す: Imported modules now have a __cached__ attribute which stores the name of the actual file that was imported: >>> import collections >>> collections . __cached__ 'c:/py32/lib/__pycache__/collections.cpython-32.pyc' キャッシュファイル名を一意にするためのイ...不十分です。 そうではなくて imp モジュール内の新規関数を使いましょう: >>> imp . source_from_cache ( 'c:/py32/lib/__pycache__/collections.cpython-32.pyc' ) 'c:/py32/lib/collections.py' >>> imp . cache_from_source ( 'c:/py32/lib/collections.py' ) 'c:/py32/lib/_..._pycache__/collections.cpython-32.pyc' py_compile と compileall モジュールはこの新命名規則とターゲットディレクトリを反映するよう更新されました。... - https://man.mtool.work/python/3.14/whatsnew/3.2.html
- What's New In Python 3.9 7792
- What's New In Python 3.9 編集者 : Łukasz Langa この記事では Python 3.8 と比較した Python 3.9 の新機能を解説します。 Python 3.9 は 2020 年 10 月 5 日にリリースされました。 詳しくは 変更履歴 を参照してください。 参考 PEP 596 - Python 3.9 リリ
...す。ここ数年で、それらの多くは警告 DeprecationWarning を出すようになりました。例えば、2012年にリリースされたPython 3.3以降、 collections.abc.Mapping の代りに collections.Mapping を使うと、警告 DeprecationWarning が出ます。 警告 DeprecationWarning および Pendi...Pythonプロジェクトの保守管理者に、Python 2サポートを止めてPython 3.9サポートを追加する時間的な余裕を与えるためのものです。 collections.abc.Mapping の別名である collections.Mapping など、 collections モジュール内の 抽象基底クラス の別名は、後方互換性のため今...fix や suffix を簡単に削除する str.removeprefix(prefix) と str.removesuffix(suffix) が追加されました。 bytes , bytearray , collections.UserString にも同様のメソッドが追加されました。詳細は PEP 616 を参照してください。(Dennis Sweeney の貢献による bpo-39939 )... - https://man.mtool.work/python/3.14/whatsnew/3.9.html
- What's New In Python 3.10 7720
- What's New In Python 3.10 編集者 : Pablo Galindo Salgado この記事では Python 3.9 と比較した Python 3.10 の新機能を解説します。Python 3.10 は2021年10月4日にリリースされました。全詳細については 変更履歴 をご覧ください。 概要 -- リリースハイラ
...ror を表示するとき、 PyErr_Display() は例外の発生元のオブジェクトにある似た属性名を候補として提示するようになりました: >>> collections . namedtoplo Traceback (most recent call last): File "<stdin>" , line 1 , in <module> AttributeError : module 'collections...。) codecs コーデック検索関数の登録を解除する codecs.unregister() 関数を追加しました。 (Hai Shi による貢献、 bpo-41842 。) collections.abc collections.abc.Callable の パラメータ化されたジェネリック の __args__ が、 typing.Callable と一致するようになりました...。 ジェネリックの collections.abc.Callable は、 typing.Callable と同様に型引数を平坦化するようになりました。 つまり、 collections.abc.Callable[[int, str... - https://man.mtool.work/python/3.14/whatsnew/3.10.html
- データ型 7490
- データ型 この章で解説されるモジュールは日付や時間、型が固定された配列、ヒープキュー、両端キュー、列挙型のような種々の特殊なデータ型を提供します。 Python also provides some built-in data types, in particular, dict , list , set and frozenset
...e によるシリアライズ 関数 グローバル変数 例外と警告 calendar --- 一般的なカレンダーに関係する機能群 コマンドラインでの使用 collections --- コンテナデータ型 ChainMap オブジェクト ChainMap の例とレシピ Counter オブジェクト deque オブジェクト deque のレシピ de...リ関数 OrderedDict オブジェクト OrderedDict の例とレシピ UserDict オブジェクト UserList オブジェクト UserString オブジェクト collections.abc --- コンテナの抽象基底クラス コレクション抽象基底クラス コレクションの抽象基底クラス -- 詳細な説明 例とレシピ heapq --... - https://man.mtool.work/python/3.14/library/datatypes.html