Re: Getting a list of an object's methods?
Alexander Schmolck <firstname.lastname@example.org> wrote in message news:<email@example.com>...
> 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
> So if no-one enlightens me, I shall file a bug report.
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.
|All times are GMT. The time now is 02:48 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.