per page, with , order by , clip by
Results of 1 - 10 of about 60 for setattr (0.041 sec.)
Type Object Structures — Python 3.14.8 ドキュメント 12230
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Type Object Structures テーマ 自動 ライト ダーク | Type Object Structu ... alloc destructor X X X tp_vectorcall_offset Py_ssize_t X X ( tp_getattr ) getattrfunc __getattribute__, __getattr__ G ( tp_setattr ) setattrfunc __setattr__, __delattr__ G tp_as_async PyAsyncMethods * sub-slots % tp_repr reprfunc __repr__ X X X tp_as_nu ... _call ternaryfunc __call__ X X tp_str reprfunc __str__ X X tp_getattro getattrofunc __getattribute__, __getattr__ X X G tp_setattro setattrofunc __setattr__, __delattr__ X X G tp_as_buffer PyBufferProcs * sub-slots % tp_flags unsigned long X X ? tp_doc ... nitproc PyObject * PyObject * PyObject * int reprfunc PyObject * PyObject * getattrfunc PyObject * const char * PyObject * setattrfunc PyObject * const char * PyObject * int getattrofunc PyObject * PyObject * PyObject * setattrofunc PyObject * PyObject ...
https://man.mtool.work/python/3.14/c-api/typeobj.html
Type Object Structures — Python 3.14.8 ドキュメント 11691
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Type Object Structures テーマ 自動 ライト ダーク | Type Object Structu ... alloc destructor X X X tp_vectorcall_offset Py_ssize_t X X ( tp_getattr ) getattrfunc __getattribute__, __getattr__ G ( tp_setattr ) setattrfunc __setattr__, __delattr__ G tp_as_async PyAsyncMethods * sub-slots % tp_repr reprfunc __repr__ X X X tp_as_nu ... _call ternaryfunc __call__ X X tp_str reprfunc __str__ X X tp_getattro getattrofunc __getattribute__, __getattr__ X X G tp_setattro setattrofunc __setattr__, __delattr__ X X G tp_as_buffer PyBufferProcs * sub-slots % tp_flags unsigned long X X ? tp_doc ... nitproc PyObject * PyObject * PyObject * int reprfunc PyObject * PyObject * getattrfunc PyObject * const char * PyObject * setattrfunc PyObject * const char * PyObject * int getattrofunc PyObject * PyObject * PyObject * setattrofunc PyObject * PyObject ...
https://man.mtool.work/python/3.14/c-api/typeobj.html
3. 拡張の型の定義: 雑多なトピック — Python 3.14.8 ドキュメント 10354
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 3. 拡張の型の定義: 雑多なトピック テーマ 自動 ライト ダーク | 3. 拡張の型の定義: 雑多なトピック ¶ この節ではさまざまな実装可 ... ods to implement standard operations */ destructor tp_dealloc ; Py_ssize_t tp_vectorcall_offset ; getattrfunc tp_getattr ; setattrfunc tp_setattr ; PyAsyncMethods * tp_as_async ; /* formerly known as tp_compare (Python 2) or tp_reserved (Python 3) */ re ... s (here for binary compatibility) */ hashfunc tp_hash ; ternaryfunc tp_call ; reprfunc tp_str ; getattrofunc tp_getattro ; setattrofunc tp_setattro ; /* Functions to access object as input/output buffer */ PyBufferProcs * tp_as_buffer ; /* Flags to defi ... e attributes are resolved. There needs to be a function which can retrieve attributes (if any are defined), and another to set attributes (if setting attributes is allowed). Removing an attribute is a special case, for which the new value passed to the ...
https://man.mtool.work/python/3.14/extending/newtypes.html
3. 拡張の型の定義: 雑多なトピック — Python 3.14.8 ドキュメント 10354
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 3. 拡張の型の定義: 雑多なトピック テーマ 自動 ライト ダーク | 3. 拡張の型の定義: 雑多なトピック ¶ この節ではさまざまな実装可 ... ods to implement standard operations */ destructor tp_dealloc ; Py_ssize_t tp_vectorcall_offset ; getattrfunc tp_getattr ; setattrfunc tp_setattr ; PyAsyncMethods * tp_as_async ; /* formerly known as tp_compare (Python 2) or tp_reserved (Python 3) */ re ... s (here for binary compatibility) */ hashfunc tp_hash ; ternaryfunc tp_call ; reprfunc tp_str ; getattrofunc tp_getattro ; setattrofunc tp_setattro ; /* Functions to access object as input/output buffer */ PyBufferProcs * tp_as_buffer ; /* Flags to defi ... e attributes are resolved. There needs to be a function which can retrieve attributes (if any are defined), and another to set attributes (if setting attributes is allowed). Removing an attribute is a special case, for which the new value passed to the ...
https://man.mtool.work/python/3.14/extending/newtypes.html
dataclasses --- データクラス — Python 3.14.8 ドキュメント 9539
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L ... , assigning to fields will generate an exception. This emulates read-only frozen instances. See the discussion below. If __setattr__() or __delattr__() is defined in the class and frozen is true, then TypeError is raised. match_args : If true (the defau ... ersion 3.10. exception dataclasses. FrozenInstanceError ¶ frozen=True 付きで定義されたデータクラスで、暗黙的に定義された __setattr__() または __delattr__() が呼び出されたときに送出されます。これは AttributeError のサブクラスです。 初期化後の処理 ¶ datac ... ver, by passing frozen=True to the @dataclass decorator you can emulate immutability. In that case, dataclasses will add __setattr__() and __delattr__() methods to the class. These methods will raise a FrozenInstanceError when invoked. There is a tiny p ...
https://man.mtool.work/python/3.14/library/dataclasses.html
dataclasses --- データクラス — Python 3.14.8 ドキュメント 9539
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » dataclasses --- データクラス テーマ 自動 ライト ダーク | dataclasses --- データクラス ¶ ソースコード: L ... , assigning to fields will generate an exception. This emulates read-only frozen instances. See the discussion below. If __setattr__() or __delattr__() is defined in the class and frozen is true, then TypeError is raised. match_args : If true (the defau ... ersion 3.10. exception dataclasses. FrozenInstanceError ¶ frozen=True 付きで定義されたデータクラスで、暗黙的に定義された __setattr__() または __delattr__() が呼び出されたときに送出されます。これは AttributeError のサブクラスです。 初期化後の処理 ¶ datac ... ver, by passing frozen=True to the @dataclass decorator you can emulate immutability. In that case, dataclasses will add __setattr__() and __delattr__() methods to the class. These methods will raise a FrozenInstanceError when invoked. There is a tiny p ...
https://man.mtool.work/python/3.14/library/dataclasses.html
プログラミング FAQ — Python 3.14.8 ドキュメント 9001
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python よくある質問 » プログラミング FAQ テーマ 自動 ライト ダーク | プログラミング FAQ ¶ 一般的な質問 ¶ ブレークポイントやステップ実行ができる、ソースコードレベ ... することによって: >>> class Namespace : ... def __init__ ( self , / , ** args ): ... for key , value in args . items (): ... setattr ( self , key , value ) ... >>> def func4 ( args ): ... args . a = 'new-value' # args は mutable Namespace ... args . b = a ... 照してください。 なお、一般的に委譲はトリッキーになりがちです。属性が設定される時には読み出される時と同様に、そのクラスに __setattr__() メソッドを定義する必要があり、それには細心の注意が必要です。 __setattr__() の基本的な実装はおおよそ以下のようになります ... : class X : ... def __setattr__ ( self , name , value ): self . __dict__ [ name ] = value ... Many __setattr__() implementations call object.__setattr__ ...
https://man.mtool.work/python/3.14/faq/programming.html
プログラミング FAQ — Python 3.14.8 ドキュメント 9001
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python よくある質問 » プログラミング FAQ テーマ 自動 ライト ダーク | プログラミング FAQ ¶ 一般的な質問 ¶ ブレークポイントやステップ実行ができる、ソースコードレベ ... することによって: >>> class Namespace : ... def __init__ ( self , / , ** args ): ... for key , value in args . items (): ... setattr ( self , key , value ) ... >>> def func4 ( args ): ... args . a = 'new-value' # args は mutable Namespace ... args . b = a ... 照してください。 なお、一般的に委譲はトリッキーになりがちです。属性が設定される時には読み出される時と同様に、そのクラスに __setattr__() メソッドを定義する必要があり、それには細心の注意が必要です。 __setattr__() の基本的な実装はおおよそ以下のようになります ... : class X : ... def __setattr__ ( self , name , value ): self . __dict__ [ name ] = value ... Many __setattr__() implementations call object.__setattr__ ...
https://man.mtool.work/python/3.14/faq/programming.html
デスクリプタ ガイド — Python 3.14.8 ドキュメント 8739
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » デスクリプタ ガイド テーマ 自動 ライト ダーク | デスクリプタ ガイド ¶ Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を ... ue ) return value def __set__ ( self , obj , value ): logging . info ( 'Updating %r to %r ' , self . public_name , value ) setattr ( obj , self . private_name , value ) class Person : name = LoggedAccess () # First descriptor instance age = LoggedAccess ... jtype = None ): return getattr ( obj , self . private_name ) def __set__ ( self , obj , value ): self . validate ( value ) setattr ( obj , self . private_name , value ) @abstractmethod def validate ( self , value ): pass Custom validators need to inheri ... super () . __new__ ( cls ) if hasattr ( cls , 'slot_names' ): empty_slots = [ null ] * len ( cls . slot_names ) object . __setattr__ ( inst , '_slotvalues' , empty_slots ) return inst def __setattr__ ( self , name , value ): 'Emulate _PyObject_GenericSe ...
https://man.mtool.work/python/3.14/howto/descriptor.html
3. データモデル — Python 3.14.8 ドキュメント 8739
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python 言語リファレンス » 3. データモデル テーマ 自動 ライト ダーク | 3. データモデル ¶ 3.1. オブジェクト、値、および型 ¶ Objects are Python's abstraction for da ... the lookup. 属性の代入や削除を行うと、インスタンスの辞書を更新しますが、クラスの辞書を更新することはありません。クラスで __setattr__() や __delattr__() メソッドが定義されている場合、直接インスタンスの辞書を更新する代わりにこれらのメソッドが呼び出されます ... d through the normal mechanism, __getattr__() is not called. (This is an intentional asymmetry between __getattr__() and __setattr__() .) This is done both for efficiency reasons and because otherwise __getattr__() would have no way to access other attr ... リティに関わるような obj と name を渡しての object.__getattr__ を使った属性アクセスは 監査イベント を送出します。 object. __setattr__ ( self , name , value ) ¶ 属性の代入が試みられた際に呼び出されます。これは通常の代入の過程 (すなわち、インスタンス辞書へ ...
https://man.mtool.work/python/3.14/reference/datamodel.html
PREV 1 2 3 4 5 6 NEXT