per page, with , order by , clip by
Results of 1 - 2 of about 2 for objtype (0.003 sec.)
デスクリプタ ガイド — Python 3.14.8 ドキュメント 11228
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » デスクリプタ ガイド テーマ 自動 ライト ダーク | デスクリプタ ガイド ¶ Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を ... e Ten class is a descriptor whose __get__() method always returns the constant 10 : class Ten : def __get__ ( self , obj , objtype = None ): return 10 このデスクリプタを使うには他のクラスのクラス変数として保存します: class A : x = 5 # Regular class attr ... すよりも、なにか処理を実行するデスクリプタの方が面白いでしょう。 import os class DirectorySize : def __get__ ( self , obj , objtype = None ): return len ( os . listdir ( obj . dirname )) class Directory : size = DirectorySize () # Descriptor instance def ... g or s , an instance of Directory . It is the obj parameter that lets the __get__() method learn the target directory. The objtype parameter is the class Directory . 管理された属性 ¶ A popular use for descriptors is managing access to instance data. The ...
https://man.mtool.work/python/3.14/howto/descriptor.html
デスクリプタ ガイド — Python 3.14.8 ドキュメント 7485
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » デスクリプタ ガイド テーマ 自動 ライト ダーク | デスクリプタ ガイド ¶ Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を ... e Ten class is a descriptor whose __get__() method always returns the constant 10 : class Ten : def __get__ ( self , obj , objtype = None ): return 10 このデスクリプタを使うには他のクラスのクラス変数として保存します: class A : x = 5 # Regular class attr ... すよりも、なにか処理を実行するデスクリプタの方が面白いでしょう。 import os class DirectorySize : def __get__ ( self , obj , objtype = None ): return len ( os . listdir ( obj . dirname )) class Directory : size = DirectorySize () # Descriptor instance def ... g or s , an instance of Directory . It is the obj parameter that lets the __get__() method learn the target directory. The objtype parameter is the class Directory . 管理された属性 ¶ A popular use for descriptors is managing access to instance data. The ...
https://man.mtool.work/python/3.14/howto/descriptor.html
PREV 1 NEXT