Trees | Indices | Help |
|
---|
|
Helper class used by the Bastion() function.
You could subclass this and pass the subclass as the bastionclass argument to the Bastion() function, as long as the constructor has the same signature (a get() function and a name for the object).
|
|||
|
|||
|
|||
|
|
Constructor. Arguments: get - a function that gets the attribute value (by name) name - a human-readable name for the original object (suggestion: use repr(object)) |
Return a representation string. This includes the name passed in to the constructor, so that if you print the bastion during debugging, at least you have some idea of what it is. |
Get an as-yet undefined attribute value. This calls the get() function that was passed to the constructor. The result is stored as an instance variable so that the next time the same attribute is requested, __getattr__() won't be invoked. If the get() function raises an exception, this is simply passed on -- exceptions are not cached. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Tue Jan 29 22:41:37 2008 | http://epydoc.sourceforge.net |