Re: [PyCrust] Should ._getAttributeNames() be recursive?
Brought to you by:
pobrien
From: Neil H. <ne...@sc...> - 2001-08-13 21:39:39
|
Patrick K. O'Brien: > PythonCard has implemented the previously discussed ._getAttributeNames() > method to expose magic attributes to introspection to extend command > autocompletion in the PyCrust shell. As discussed, this method was going to > walk up its inheritance tree recursively. When I added this method to the > PyCrust function that gets attributes, I added it in such a way that it > would be called recursively as well. (See implementation below.) Do you filter out any duplicate names? My implementation of getAttributeNames, which can be fixed if needed, will currently list all of the attributes available on a class which includes those in base classes. Another issue is that a subclass may decide not to offer all the attributes of a base class, possibly because of security or modularity reasons, although I imagine this is quite rare. > How does that strike you folks? Anyone want to write an "Extended > Introspection PEP?" I think the next stage is to bring this up informally on comp.lang.python. Neil |