per page, with , order by , clip by
Results of 1 - 10 of about 40 for dataclass (0.038 sec.)
dataclasses --- データクラス — Python 3.14.8 ドキュメント 14447
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L ... ib/dataclasses.py このモジュールは、 __init__() や __repr__() のような 特殊メソッド を生成し、ユーザー定義のクラスに自動的に追加するデコ ... らの生成されたメソッドで利用されるメンバー変数は PEP 526 型アノテーションを用いて定義されます。例えば、このコードでは: from dataclasses import dataclass @dataclass class InventoryItem : """Class for keeping track of an item in inventory.""" name : str unit ... InventoryItem クラスの定義中にこのメソッドが直接明記されるわけではありません。 Added in version 3.7. モジュールの内容 ¶ @ dataclasses. dataclass ( * , init = True , repr = True , eq = True , order = False , unsafe_hash = False , frozen = False , match_ar ...
https://man.mtool.work/python/3.14/library/dataclasses.html
dataclasses --- データクラス — Python 3.14.8 ドキュメント 14447
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L ... ib/dataclasses.py このモジュールは、 __init__() や __repr__() のような 特殊メソッド を生成し、ユーザー定義のクラスに自動的に追加するデコ ... らの生成されたメソッドで利用されるメンバー変数は PEP 526 型アノテーションを用いて定義されます。例えば、このコードでは: from dataclasses import dataclass @dataclass class InventoryItem : """Class for keeping track of an item in inventory.""" name : str unit ... InventoryItem クラスの定義中にこのメソッドが直接明記されるわけではありません。 Added in version 3.7. モジュールの内容 ¶ @ dataclasses. dataclass ( * , init = True , repr = True , eq = True , order = False , unsafe_hash = False , frozen = False , match_ar ...
https://man.mtool.work/python/3.14/library/dataclasses.html
typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 8284
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース ... ] Here is an example of how you might use Annotated to add metadata to type annotations if you were doing range analysis: @dataclass class ValueRange : lo : int hi : int T1 = Annotated [ int , ValueRange ( - 10 , 5 )] T2 = Annotated [ T1 , ValueRange ( - ... s Annotated supports variadic arguments. The order of the metadata elements is preserved and matters for equality checks: @dataclass class ctype : kind : str a1 = Annotated [ int , ValueRange ( 3 , 10 ), ctype ( "char" )] a2 = Annotated [ int , ctype ( "c ... = Annotated [ int , ValueRange ( 3 , 10 ), ValueRange ( 3 , 10 ) ] Annotated can be used with nested and generic aliases: @dataclass class MaxLen : value : int type Vec [ T ] = Annotated [ list [ tuple [ T , T ]], MaxLen ( 10 )] # When used in a type anno ...
https://man.mtool.work/python/3.14/library/typing.html
変更履歴 — Python 3.14.8 ドキュメント 8284
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac ... n place of b'' , so the following references to b'' were unpickled as an empty bytearray object. gh-148947 : Fix crash in @dataclasses.dataclass with slots=True that occurred when a function found within the class had an empty __class__ cell. gh-148680 : ... rator that calls next() on the same reader from within __next__ . gh-105936 : Attempting to mutate non-field attributes of dataclasses with both frozen and slots being True now raises FrozenInstanceError instead of TypeError . Their non-dataclass subclass ... es that use new protocol (that is, subprocesses using Python 3.13.10, 3.14.1 and 3.15). gh-142214 : Fix two regressions in dataclasses in Python 3.14.1 related to annotations. An exception is no longer raised if slots=True is used and the __init__ method ...
https://man.mtool.work/python/3.14/whatsnew/changelog.html
typing --- 型ヒントのサポート — Python 3.14.8 ドキュメント 8284
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » typing --- 型ヒントのサポート テーマ 自動 ライト ダーク | typing --- 型ヒントのサポート ¶ Added in version 3.5. ソース ... ] Here is an example of how you might use Annotated to add metadata to type annotations if you were doing range analysis: @dataclass class ValueRange : lo : int hi : int T1 = Annotated [ int , ValueRange ( - 10 , 5 )] T2 = Annotated [ T1 , ValueRange ( - ... s Annotated supports variadic arguments. The order of the metadata elements is preserved and matters for equality checks: @dataclass class ctype : kind : str a1 = Annotated [ int , ValueRange ( 3 , 10 ), ctype ( "char" )] a2 = Annotated [ int , ctype ( "c ... = Annotated [ int , ValueRange ( 3 , 10 ), ValueRange ( 3 , 10 ) ] Annotated can be used with nested and generic aliases: @dataclass class MaxLen : value : int type Vec [ T ] = Annotated [ list [ tuple [ T , T ]], MaxLen ( 10 )] # When used in a type anno ...
https://man.mtool.work/python/3.14/library/typing.html
列挙型 HOWTO — Python 3.14.8 ドキュメント 8097
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » 列挙型 HOWTO テーマ 自動 ライト ダーク | 列挙型 HOWTO ¶ Enum は、ユニークな値に束縛されたシンボル名の集合です。グローバル変数に似ていますが、 repr ... のグループ間での共通の挙動を共有するという利点もあります。 ( OrderedEnum の例を参照してください。) データクラスのサポート ¶ dataclass を継承する場合、 __repr__() は継承するクラス名を省略します。 例えば: >>> from dataclasses import dataclass , field >>> @da ... 'small' , 6 ... DOG = 'medium' , 4 ... >>> Creature . DOG <Creature.DOG: size='medium', legs=4> 標準の repr() を使うには、 dataclass() の引数 repr=False を使用してください。 バージョン 3.12 で変更: dataclass のフィールドだけが値の領域に表示され、dataclass ... の名前は表示されなくなりました 注釈 Adding @~dataclasses.dataclass decorator to Enum and its subclasses is not supported. It will not raise any errors, but it will produce very ...
https://man.mtool.work/python/3.14/howto/enum.html
列挙型 HOWTO — Python 3.14.8 ドキュメント 8097
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » 列挙型 HOWTO テーマ 自動 ライト ダーク | 列挙型 HOWTO ¶ Enum は、ユニークな値に束縛されたシンボル名の集合です。グローバル変数に似ていますが、 repr ... のグループ間での共通の挙動を共有するという利点もあります。 ( OrderedEnum の例を参照してください。) データクラスのサポート ¶ dataclass を継承する場合、 __repr__() は継承するクラス名を省略します。 例えば: >>> from dataclasses import dataclass , field >>> @da ... 'small' , 6 ... DOG = 'medium' , 4 ... >>> Creature . DOG <Creature.DOG: size='medium', legs=4> 標準の repr() を使うには、 dataclass() の引数 repr=False を使用してください。 バージョン 3.12 で変更: dataclass のフィールドだけが値の領域に表示され、dataclass ... の名前は表示されなくなりました 注釈 Adding @~dataclasses.dataclass decorator to Enum and its subclasses is not supported. It will not raise any errors, but it will produce very ...
https://man.mtool.work/python/3.14/howto/enum.html
What's New In Python 3.10 — Python 3.14.8 ドキュメント 7801
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.10 テーマ 自動 ライト ダーク | What's New In Python 3.10 ¶ 編集者 : Pablo Galindo Salgado この記事では Python 3.9 と ... erlying curses library. (Contributed by Zackery Spytz in bpo-39273 .) データクラス ¶ __slots__ ¶ Added slots parameter in @dataclasses.dataclass decorator. (Contributed by Yurii Karabas in bpo-42269 ) Keyword-only fields ¶ dataclasses now supports fields ... _ method. There are a number of ways of specifying keyword-only fields. You can say that every field is keyword-only: from dataclasses import dataclass @dataclass ( kw_only = True ) class Birthday : name : str birthday : datetime . date Both name and birt ... hday are keyword-only parameters to the generated __init__ method. You can specify keyword-only on a per-field basis: from dataclasses import dataclass , field @dataclass class Birthday : name : str birthday : datetime . date = field ( kw_only = True ) He ...
https://man.mtool.work/python/3.14/whatsnew/3.10.html
What's New In Python 3.10 — Python 3.14.8 ドキュメント 7801
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » What's New In Python 3.10 テーマ 自動 ライト ダーク | What's New In Python 3.10 ¶ 編集者 : Pablo Galindo Salgado この記事では Python 3.9 と ... erlying curses library. (Contributed by Zackery Spytz in bpo-39273 .) データクラス ¶ __slots__ ¶ Added slots parameter in @dataclasses.dataclass decorator. (Contributed by Yurii Karabas in bpo-42269 ) Keyword-only fields ¶ dataclasses now supports fields ... _ method. There are a number of ways of specifying keyword-only fields. You can say that every field is keyword-only: from dataclasses import dataclass @dataclass ( kw_only = True ) class Birthday : name : str birthday : datetime . date Both name and birt ... hday are keyword-only parameters to the generated __init__ method. You can specify keyword-only on a per-field basis: from dataclasses import dataclass , field @dataclass class Birthday : name : str birthday : datetime . date = field ( kw_only = True ) He ...
https://man.mtool.work/python/3.14/whatsnew/3.10.html
queue --- 同期キュークラス — Python 3.14.8 ドキュメント 7520
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 並行実行 » queue --- 同期キュークラス テーマ 自動 ライト ダーク | queue --- 同期キュークラス ¶ ソースコード: Lib/queue.py The queue ... not comparable, the data can be wrapped in a class that ignores the data item and only compares the priority number: from dataclasses import dataclass , field from typing import Any @dataclass ( order = True ) class PrioritizedItem : priority : int item ...
https://man.mtool.work/python/3.14/library/queue.html
PREV 1 2 3 4 NEXT