RE: [PyCrust] Should ._getAttributeNames() be recursive?
Brought to you by:
pobrien
|
From: Patrick K. O'B. <po...@or...> - 2001-08-13 21:48:07
|
I currently remove duplicates and sort the list.
---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."
-----Original Message-----
From: pyc...@li...
[mailto:pyc...@li...]On Behalf Of Neil Hodgson
Sent: Monday, August 13, 2001 4:39 PM
To: pyc...@li...
Subject: Re: [PyCrust] Should ._getAttributeNames() be recursive?
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
_______________________________________________
PyCrust-users mailing list
PyC...@li...
http://lists.sourceforge.net/lists/listinfo/pycrust-users
|