Class v.c.e.d.attribute(object):

Part of vmc.contrib.epsilon.descriptor View In Hierarchy

Known subclasses: vmc.contrib.axiom.scheduler.Scheduler.running

Convenience class for providing one-shot descriptors, similar to 'property'. For example:
>>> 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
def __get__(self, oself, type):
Private implementation of descriptor interface.
def __set__(self, oself, value):
Private implementation of descriptor interface.
def __delete__(self, oself):
Private implementation of descriptor interface.
def set(self, value):
Implement this method to provide attribute setting. Default behavior is that attributes are not settable.
def get(self):
Implement this method to provide attribute retrieval. Default behavior is that unset attributes do not have any value.
def delete(self):
Implement this method to provide attribute deletion. Default behavior is that attributes cannot be deleted.
API Documentation for vodafone-mobile-connect-card-driver-for-linux, generated by pydoctor at 2008-01-10 13:06:31.