Getting a list of an object's methods?

Michele Simionato mis6 at pitt.edu
Tue Jun 24 13:18:49 EDT 2003


Alexander Schmolck <a.schmolck at gmx.net> wrote in message news:<yfsadc86dg9.fsf at black132.ex.ac.uk>...
> Now I have no idea what the hell a "member" is supposed to be (inspect's docu
> won't tell you and the only sense in which it occurs in the language ref is
> that of set membership (i.e. qualfiying __contains__)), so my guess is that
> it's just some ad hoc synonym for attribute (not that I remember stumbling
> across a clear definition of attribute anywhere, either).
> 
> "Member" better have *some* reasonably well-defined meaning, because unlike
> `dir` which is supposed to just give a "convinient" overview of an objects
> content in interactive session, AFAICT `inspect.getmembers` is meant to be
> used for programming. I somehow prefer my programs to have well-defined
> meanings.
> 
> So if no-one enlightens me, I shall file a bug report.
> 
> 
> 'as

Do you mean a documentation bug report? I do agree with you that a 
non-ambiguous definition of "member" should be given in the language 
reference. At the present it seems that metaclass methods are not
considered "members" of the instance class: if this is the case, 
it should be documented. On the other hand, if this is not the case, 
then inspect.getmember is buggy.


                                                    Michele




More information about the Python-list mailing list