Results of 1 - 10 of about 266 for Init (0.037 sec.)
- dataclasses --- データクラス — Python 3.14.8 ドキュメント 11905
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L
...ib/dataclasses.py このモジュールは、 __init__() や __repr__() のような 特殊メソッド を生成し、ユーザー定義のクラスに自動的に追加するデコレーターや関数を提供します。こ...d : int = 0 def total_cost ( self ) -> float : return self . unit_price * self . quantity_on_hand とりわけ、以下のような __init__() が追加されます: def __init__ ( self , name : str , unit_price : float , quantity_on_hand : int = 0 ): self . name = na...中にこのメソッドが直接明記されるわけではありません。 Added in version 3.7. モジュールの内容 ¶ @ dataclasses. dataclass ( * , init = True , repr = True , eq = True , order = False , unsafe_hash = False , frozen = False , match_args = True , kw_only = Fa... - https://man.mtool.work/python/3.14/library/dataclasses.html
- dataclasses --- データクラス — Python 3.14.8 ドキュメント 11905
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L
...ib/dataclasses.py このモジュールは、 __init__() や __repr__() のような 特殊メソッド を生成し、ユーザー定義のクラスに自動的に追加するデコレーターや関数を提供します。こ...d : int = 0 def total_cost ( self ) -> float : return self . unit_price * self . quantity_on_hand とりわけ、以下のような __init__() が追加されます: def __init__ ( self , name : str , unit_price : float , quantity_on_hand : int = 0 ): self . name = na...中にこのメソッドが直接明記されるわけではありません。 Added in version 3.7. モジュールの内容 ¶ @ dataclasses. dataclass ( * , init = True , repr = True , eq = True , order = False , unsafe_hash = False , frozen = False , match_args = True , kw_only = Fa... - https://man.mtool.work/python/3.14/library/dataclasses.html
- 2. 拡張の型の定義: チュートリアル — Python 3.14.8 ドキュメント 9427
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 2. 拡張の型の定義: チュートリアル テーマ 自動 ライト ダーク | 2. 拡張の型の定義: チュートリアル ¶ Python では、組み込みの s
..._HEAD /* Type-specific fields go here. */ } CustomObject ; static PyTypeObject CustomType = { . ob_base = PyVarObject_HEAD_INIT ( NULL , 0 ) . tp_name = "custom.Custom" , . tp_doc = PyDoc_STR ( "Custom objects" ), . tp_basicsize = sizeof ( CustomObje...OD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED }, { 0 , NULL } }; static PyModuleDef custom_module = { . m_base = PyModuleDef_HEAD_INIT , . m_name = "custom" , . m_doc = "Example module that creates an extension type." , . m_size = 0 , . m_slots = custom_mod...ule_slots , }; PyMODINIT_FUNC PyInit_custom ( void ) { return PyModuleDef_Init ( & custom_module ); } 一度に把握するにはちょっと量が多いですが、前の... - https://man.mtool.work/python/3.14/extending/newtypes_tutorial.html
- 2. 拡張の型の定義: チュートリアル — Python 3.14.8 ドキュメント 9427
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 2. 拡張の型の定義: チュートリアル テーマ 自動 ライト ダーク | 2. 拡張の型の定義: チュートリアル ¶ Python では、組み込みの s
..._HEAD /* Type-specific fields go here. */ } CustomObject ; static PyTypeObject CustomType = { . ob_base = PyVarObject_HEAD_INIT ( NULL , 0 ) . tp_name = "custom.Custom" , . tp_doc = PyDoc_STR ( "Custom objects" ), . tp_basicsize = sizeof ( CustomObje...OD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED }, { 0 , NULL } }; static PyModuleDef custom_module = { . m_base = PyModuleDef_HEAD_INIT , . m_name = "custom" , . m_doc = "Example module that creates an extension type." , . m_size = 0 , . m_slots = custom_mod...ule_slots , }; PyMODINIT_FUNC PyInit_custom ( void ) { return PyModuleDef_Init ( & custom_module ); } 一度に把握するにはちょっと量が多いですが、前の... - https://man.mtool.work/python/3.14/extending/newtypes_tutorial.html
- Allocating objects on the heap — Python 3.14.8 ドキュメント 8965
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Allocating objects on the heap テーマ 自動 ライト ダーク | Allocating
...い参照。 PyVarObject * _PyObject_NewVar ( PyTypeObject * type , Py_ssize_t size ) ¶ 戻り値: 新しい参照。 PyObject * PyObject_Init ( PyObject * op , PyTypeObject * type ) ¶ 戻り値: 借用参照。 次に属します: Stable ABI . Initialize a newly allocated objec...t op with its type and initial reference. Returns the initialized object. Other fields of the object are not initialized. Despite its name, this funct...ion is unrelated to the object's __init__() method ( tp_init slot). Specifically, this function does not call the object's __init__() method. In general, consider... - https://man.mtool.work/python/3.14/c-api/allocation.html
- Allocating objects on the heap — Python 3.14.8 ドキュメント 8965
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Allocating objects on the heap テーマ 自動 ライト ダーク | Allocating
...い参照。 PyVarObject * _PyObject_NewVar ( PyTypeObject * type , Py_ssize_t size ) ¶ 戻り値: 新しい参照。 PyObject * PyObject_Init ( PyObject * op , PyTypeObject * type ) ¶ 戻り値: 借用参照。 次に属します: Stable ABI . Initialize a newly allocated objec...t op with its type and initial reference. Returns the initialized object. Other fields of the object are not initialized. Despite its name, this funct...ion is unrelated to the object's __init__() method ( tp_init slot). Specifically, this function does not call the object's __init__() method. In general, consider... - https://man.mtool.work/python/3.14/c-api/allocation.html
- 5. インポートシステム — Python 3.14.8 ドキュメント 6753
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 5. インポートシステム テーマ 自動 ライト ダーク | 5. インポートシステム ¶ ある 1 つの module にある Python コードから他のモジュールを イ
...ケージが定義されています。通常のパッケージは Python 3.2 以前から存在する伝統的なパッケージです。典型的な通常のパッケージは __init__.py ファイルを含むディレクトリとして実装されます。通常のパッケージがインポートされたとき、この __init__.py ファイルが暗黙...的に実行され、それで定義しているオブジェクトがパッケージ名前空間にある名前に束縛されます。 __init__.py ファイルは、他のモジュールに書ける Python コードと同じものを含むことができ、モジュールがインポートされたときに Python...。 例えば、以下のようなファイルシステム配置は、3 つのサブパッケージを持つ最上位の parent パッケージを定義します: parent / __init__ . py one / __init__ . py two / __init__ . py three / __init__ . py parent.one をインポートすると暗黙的に parent/__init__... - https://man.mtool.work/python/3.14/reference/import.html
- 変更履歴 — Python 3.14.8 ドキュメント 6753
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac
...ed member's name replaced with the link's. Core and Builtins ¶ gh-158583 : bytes.fromhex() and bytearray.fromhex() : Fix uninitialized memory read. Patch by Victor Stinner. gh-156204 : Fix a crash in PyErr_GivenExceptionMatches() when evaluating deep...ias parameters have been cached. gh-155504 : Fix a crash when thread state creation fails before the thread state is fully initialized. gh-155526 : Fix spurious OverflowError for abs(nanj) in case errno was previously set to ERANGE by some library ca...es callbacks on some platforms, such as s390x. gh-157048 : Preserve the position and contents of io.BytesIO when BytesIO.__init__() fails because a buffer is exported. gh-156961 : Fix tkinter.font.nametofont() and the tkinter.font.Font constructor fo... - https://man.mtool.work/python/3.14/whatsnew/changelog.html
- 5. インポートシステム — Python 3.14.8 ドキュメント 6753
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 5. インポートシステム テーマ 自動 ライト ダーク | 5. インポートシステム ¶ ある 1 つの module にある Python コードから他のモジュールを イ
...ケージが定義されています。通常のパッケージは Python 3.2 以前から存在する伝統的なパッケージです。典型的な通常のパッケージは __init__.py ファイルを含むディレクトリとして実装されます。通常のパッケージがインポートされたとき、この __init__.py ファイルが暗黙...的に実行され、それで定義しているオブジェクトがパッケージ名前空間にある名前に束縛されます。 __init__.py ファイルは、他のモジュールに書ける Python コードと同じものを含むことができ、モジュールがインポートされたときに Python...。 例えば、以下のようなファイルシステム配置は、3 つのサブパッケージを持つ最上位の parent パッケージを定義します: parent / __init__ . py one / __init__ . py two / __init__ . py three / __init__ . py parent.one をインポートすると暗黙的に parent/__init__... - https://man.mtool.work/python/3.14/reference/import.html
- Object Life Cycle — Python 3.14.8 ドキュメント 6704
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Object Life Cycle テーマ 自動 ライト ダーク | Object Life Cycle ¶ This
...r B to occur after A . Life Events tp_new tp_new start->tp_new type call tp_alloc tp_alloc tp_new->tp_alloc direct call tp_init tp_init tp_new->tp_init reachable reachable tp_init->reachable reachable->tp_init tp_traverse tp_traverse reachable->tp_tr..._new is called to create a new object. tp_alloc is directly called by tp_new to allocate the memory for the new object. tp_init initializes the newly created object. tp_init can be called again to re-initialize an object, if desired. The tp_init call...can also be skipped entirely, for example by Python code calling __new__() . After tp_init completes, the object is ready to use. Some time after the last reference to an object is removed: If an object is not mar... - https://man.mtool.work/python/3.14/c-api/lifecycle.html