Getting a list of an object's methods?
Jeremy Yallop
jeremy at jdyallop.freeserve.co.uk
Mon Jun 23 17:11:26 EDT 2003
Alexander Schmolck wrote:
> The premises are right, but they don't entail the conclusion. `dir`s behavior
> is not guaranteed to be stable, but `inspect.getmembers`'s obviously is [1].
[further logic and "obvious" things snuipped]
All very well, but inspect.getmembers is implemented using dir() /now/,
and doesn't return all of the methods in the /currently-existing/
versions of Python that the OP wants to use. It isn't an appropriate
solution, unfortunately.
> I don't think "What methods does this object have?" is a question
> that only a python wizard should be able to ask and receive a
> well-defined answer.
Well, that's certainly true.
Jeremy.
More information about the Python-list
mailing list