Bastion Documentation Error?

Jeremy Hylton jeremy at alum.mit.edu
Wed Apr 3 18:54:03 EST 2002


jimd at vega.starshine.org (Jim Dennis) wrote in message news:<a8dsj3$1n4j$1 at news.idiom.com>...
> I'm a bit confused by the Bastion.Bastion() function.
>  From the documentation I read:
> 
>  """
>  Protect the object object, returning a bastion for the object. Any
>  attempt to access one of the object's attributes will have to be
>  approved by the filter function; if the access is denied an 
>  AttributeError exception will be raised. 
>  """
> 
>  ... but playing with it I find that it raises an AttributeError on 
>  any attempt to access any class or instance variables.  It always 
>  seems to call the filter function, then (regardless of the results) 
>  it seems to then check to see if the attribute is a method and block 
>  access even if the filter function returned a true value.
> 
>  If that is the intent (that only *methods* can be exposed through
>  regardless of the filter function) then I think this should be made 
>  more clear in the documentation.

It's a bug in the documentation.  Could you submit a patch with the
new words?  Or at least a bug report?

Jeremy



More information about the Python-list mailing list