Next / Previous / Contents / Shipman's homepage

74.4. BaseEncounter.__getattr__(): Handle references to undefined attributes

This method returns None whenever anyone tries to get an attribute that doesn't exist in the instance. For a discussion of why this is necessary, see Section 74.1, “Design notes for the BaseEncounter class”.

baseclasses.py
# - - -   B a s e E n c o u n t e r . _ _ g e t a t t r _ _   - - -

    def __getattr__(self, name):
        '''Called when unknown attributes are referenced.
        '''
        return None