Part of vmc.contrib.epsilon.descriptor View In Hierarchy
Known subclasses: vmc.contrib.axiom.scheduler.Scheduler.running
>>> from epsilon.descriptor import attribute >>> class Dynamo(object): ... class dynamic(attribute): ... def get(self): ... self.dynCount += 1 ... return self.dynCount ... def set(self, value): ... self.dynCount += value ... dynCount = 0 ... >>> d = Dynamo() >>> d.dynamic 1 >>> d.dynamic 2 >>> d.dynamic = 6 >>> d.dynamic 9 >>> d.dynamic 10 >>> del d.dynamic Traceback (most recent call last): ... AttributeError: attribute cannot be removed
Method | __get__ | Private implementation of descriptor interface. |
Method | __set__ | Private implementation of descriptor interface. |
Method | __delete__ | Private implementation of descriptor interface. |
Method | set | Implement this method to provide attribute setting. Default behavior |
Method | get | Implement this method to provide attribute retrieval. Default behavior |
Method | delete | Implement this method to provide attribute deletion. Default behavior |