how to get names of attributes

Chris Angelico rosuav at gmail.com
Wed Dec 30 06:58:56 EST 2015


On Wed, Dec 30, 2015 at 10:51 PM, Charles T. Smith
<cts.private.yahoo at gmail.com> wrote:
> Does anyone know *why* the __members__ method was deprecated, to be
> replaced by dir(), which doesn't tell the truth (if only it took an
> optional parameter to say: "be truthful")

Does vars() help here? It works on old-style and new-style classes,
and it's doing broadly the same sort of thing as you're talking about.

ChrisA



More information about the Python-list mailing list