per page, with , order by , clip by
Results of 1 - 10 of about 14 for setter (0.009 sec.)
abc --- 抽象基底クラス 13898
abc --- 抽象基底クラス ソースコード: Lib/abc.py このモジュールは Python に PEP 3119 で概要が示された 抽象基底クラス (ABC) を定義する基盤を提供します。なぜこれが Python に付け加えられたかについてはその PEP を参照してください。 (ABC に基づいた ... stract_staticmethod ( arg3 ): ... @property @abstractmethod def my_abstract_property ( self ): ... @my_abstract_property . setter @abstractmethod def my_abstract_property ( self , val ): ... @abstractmethod def _get_x ( self ): ... @abstractmethod def ... ract_staticmethod ( arg ): ... @ abc. abstractproperty バージョン 3.3 で非推奨: @property 、 @property.getter 、 @property.setter 、 @property.deleter を @abstractmethod と組み合わせて使えるようになったため、このデコレータは不要になりました。 抽象プロパ ... ct にすることで、読み書きできる抽象プロパティを定義することができます: class C ( ABC ): @property def x ( self ): ... @x . setter @abstractmethod def x ( self , val ): ... 構成するメソッド全てが abstract でない場合、abstract と定義されたメソッドのみが、 ...
https://man.mtool.work/python/3.14/library/abc.html
2. 拡張の型の定義: チュートリアル 11308
2. 拡張の型の定義: チュートリアル Python では、組み込みの str 型や list 型のような Python コードから操作できる新しい型を C 拡張モジュールの作者が定義できます。 全ての拡張の型のコードはあるパターンに従うのですが、書き始める前に理解しておくべ ... t be a string" ); return -1 ; } Py_SETREF ( self -> last , Py_NewRef ( value )); return 0 ; } static PyGetSetDef Custom_getsetters [] = { { "first" , Custom_getfirst , Custom_setfirst , "ファーストネーム" , NULL }, { "last" , Custom_getlast , Custom_se ... , . tp_dealloc = Custom_dealloc , . tp_members = Custom_members , . tp_methods = Custom_methods , . tp_getset = Custom_getsetters , }; static int custom_module_exec ( PyObject * m ) { if ( PyType_Ready ( & CustomType ) < 0 ) { return -1 ; } if ( PyMod ... void ) { return PyModuleDef_Init ( & custom_module ); } first と last 属性をもっと細かく制御するため、独自の getter 関数と setter 関数を使います。 first 属性を取得、設定する関数は次のとおりです。 static PyObject * Custom_getfirst ( PyObject * op , void ...
https://man.mtool.work/python/3.14/extending/newtypes_tutorial.html
組み込み関数 9137
組み込み関数 Python インタプリタには数多くの関数と型が組み込まれており、いつでも利用できます。それらをここにアルファベット順に挙げます。 組み込み関数 A abs() aiter() all() anext() any() ascii() B bin() bool() breakpoint() bytearray() bytes( ... y ( getx , setx , delx , "I'm the 'x' property." ) c が C のインスタンスならば、 c.x は getter を呼び出し、 c.x = value は setter を、 del c.x は deleter を呼び出します。 doc が指定されていれば、その値がプロパティ属性のドキュメンテーション文字列になりま ... まま 読み出し専用属性の "getter" にし、 voltage のドキュメント文字列を "Get the current voltage." に設定します。 @ getter @ setter @ deleter property オブジェクトは getter , setter , deleter メソッドを持っています。これらのメソッドをデコレータとして使う ... ss C : def __init__ ( self ): self . _x = None @property def x ( self ): """I'm the 'x' property.""" return self . _x @x . setter def x ( self , value ): self . _x = value @x . deleter def x ( self ): del self . _x このコードは最初の例と等価です。追加の ...
https://man.mtool.work/python/3.14/builtins/functions.html
共通のオブジェクト構造体 (common object structure) 9137
共通のオブジェクト構造体 (common object structure) Python のオブジェクト型の定義には、多数の構造体が使われます。 この節では、それらの構造体と使い方を説明します。 基本のオブジェクト型とマクロ すべての Python オブジェクトは、メモリ上の表現の先 ... です。 PyTypeObject.tp_getset スロットの説明も参照してください。 const char * name 属性名 getter get 属性を取得する C 関数。 setter set 属性を設定または削除する、省略可能な C 関数。 NULL なら属性は読み取り専用になります。 const char * doc 任意のドキュメン ... losure ) を受け取ります。 成功すると新しい参照を返し、失敗すると例外を設定して NULL を返す必要があります。 typedef int ( * setter ) ( PyObject * , PyObject * , void * ) 次に属します: Stable ABI . set 関数は、2 つの PyObject * 引数 (インスタンスと設定す ...
https://man.mtool.work/python/3.14/c-api/structures.html
デスクリプタ ガイド 8717
デスクリプタ ガイド Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を使うと、オブジェクトの属性の検索、保存、削除をカスタマイズできます。 本ガイドは4つの大項目から構成されています。 最初の「入門」では基本の紹介をし ... f . fdel ( obj ) def getter ( self , fget ): return type ( self )( fget , self . fset , self . fdel , self . __doc__ ) def setter ( self , fset ): return type ( self )( self . fget , fset , self . fdel , self . __doc__ ) def deleter ( self , fdel ): re ... dept = 'Space Pirate' Traceback (most recent call last): ... AttributeError : property 'dept' of 'Immutable' object has no setter >>> mark . location = 'Mars' Traceback (most recent call last): ... AttributeError : 'Immutable' object has no attribute ' ...
https://man.mtool.work/python/3.14/howto/descriptor.html
C API Stability 8279
C API Stability 特記のない限り、Python の C API には後方互換性ポリシー PEP 387 が適用されます。 変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行います)。 既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修 ... uiry iternextfunc lenfunc newfunc objobjargproc objobjproc releasebufferproc reprfunc richcmpfunc setattrfunc setattrofunc setter ssizeargfunc ssizeobjargproc ssizessizeargfunc ssizessizeobjargproc symtable ternaryfunc traverseproc unaryfunc vectorcall ...
https://man.mtool.work/python/3.14/c-api/stable.html
threading --- スレッドベースの並列処理 8279
threading --- スレッドベースの並列処理 ソースコード: Lib/threading.py このモジュールでは、高水準のスレッドインターフェースをより低水準 な _thread モジュールの上に構築しています。 利用可能な環境 : not WASI. このモジュールは WebAssembly では動 ... ame 属性を設定しても、Python の Thread オブジェクトだけが更新されます。 getName ( ) setName ( ) name に対する非推奨 getter/setter API; 代わりにプロパティを直接使用してください。 バージョン 3.10 で非推奨. ident 'スレッド識別子' 、または、スレッドが開始さ ... 存中のスレッドが全てなくなると、 Python プログラム全体が終了します。 isDaemon ( ) setDaemon ( ) daemon に対する非推奨 getter/setter API; 代わりにプロパティを直接使用してください。 バージョン 3.10 で非推奨. Lock オブジェクト プリミティブロックとは、ロック ...
https://man.mtool.work/python/3.14/library/threading.html
What's New in Python 2.6 8279
What's New in Python 2.6 著者 : A.M. Kuchling (amk at amk.ca) この記事では、2008 年 10 月 1 日にリリースされた Python 2.6 の新機能を説明します。 リリース日程は PEP 361 に記載されています。 Python 2.6 の主要なテーマは、言語を大幅に再設計する ... は限定的で、ものによっては動作しませんでした。 (Implemented by Thomas Wouters.) プロパティに @~property.getter 、 @~property.setter 、 @~property.deleter という 3 つのデコレーターが加わりました。 既存のプロパティに取得・設定・削除の関数を追加するための便 ... 利な書き方を提供します。 次のように使います。 class C ( object ): @property def x ( self ): return self . _x @x . setter def x ( self , value ): self . _x = value @x . deleter def x ( self ): del self . _x class D ( C ): @C . x . getter def x ... ( self ): return self . _x * 2 @x . setter def x ( self , value ): self . _x = value / 2 組み込み集合型のいくつかのメソッドが、複数のイテラブルを受け付けるようになり ...
https://man.mtool.work/python/3.14/whatsnew/2.6.html
オブジェクトプロトコル (object protocol) 7842
オブジェクトプロトコル (object protocol) PyObject * Py_GetConstant ( unsigned int constant_id ) 次に属します: Stable ABI (バージョン 3.13 より). 定数への 強参照 を取得します。 constant_id が無効な場合、例外を設定して NULL を返します。 const ... PyObject * o , PyObject * value , void * context ) 次に属します: Stable ABI (バージョン 3.7 より). __dict__ デスクリプタの setter の総称的な実装です。この実装では辞書を削除することは許されていません。 Added in version 3.3. PyObject * * _PyObject_GetDic ...
https://man.mtool.work/python/3.14/c-api/object.html
変更履歴 7842
変更履歴 次の Python バージョン リリース日: XXXX-XX-XX セキュリティ gh-160499 : Fix unbounded memory growth in asyncio TLS connections when a peer stops reading but keeps sending records that make OpenSSL generate its own replies (such as T ... 情報を更新すると CAPABILITY 応答を消費し、 response() で読み取れなくなっていました。 gh-113318 : Argument Clinic が生成した setter が削除に対応していない属性を削除した場合のクラッシュを修正しました。 frame.f_trace_opcodes や、 _ssl._SSLSocket の context ... \Uhhhhhhhh として表示します。 Victor Stinner によるパッチです。 gh-113318 : プリプロセッサーの条件ブロック内の @getter と @setter に対する Argument Clinic の処理を修正しました。 以前は内部エラーで失敗していました。 同じ属性のアクセサーで C のベース名が ...
https://man.mtool.work/python/3.14/whatsnew/changelog.html
PREV 1 2 NEXT