Table of Contents

Class: Accessor Twisted-0.17.4/twisted/python/reflect.py

Extending this class will give you explicit accessor methods; a method called set_foo, for example, is the same as an if statement in __setattr__ looking for foo. Same for get_foo and del_foo. There are also reallyDel and reallySet methods, so you can override specifics in subclasses without clobbering __setattr__ and __getattr__.

Methods   
__delattr__
__getattr__
__setattr__
reallyDel
reallySet
  __delattr__ 
__delattr__ ( self,  k )

  __getattr__ 
__getattr__ ( self,  k )

Exceptions   
AttributeError("%s instance has no accessor for: %s" %( str( self.__class__ ), k ) )
  __setattr__ 
__setattr__ (
        self,
        k,
        v,
        )

  reallyDel 
reallyDel ( self,  k )

actually del self.k without incurring side-effects. This is a hook to be overridden by subclasses.

  reallySet 
reallySet (
        self,
        k,
        v,
        )

actually set self.k to v without incurring side-effects. This is a hook to be overridden by subclasses.


Table of Contents

This document was automatically generated on Sat Apr 20 01:31:23 2002 by HappyDoc version 2.0