Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100983

Re: how to get names of attributes

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: how to get names of attributes
Date Wed, 30 Dec 2015 22:58:56 +1100
Lines 10
Message-ID <mailman.67.1451476745.11925.python-list@python.org> (permalink)
References <n60gfk$b0t$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 2+XaY6+fXMy5gRxJTyROMgGaT7TXTv39hcckDNQdDP3g==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'classes,': 0.05; 'cc:addr :python-list': 0.09; 'deprecated,': 0.09; 'here?': 0.09; 'optional': 0.09; 'wed,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'new-style': 0.16; 'old-style': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'parameter': 0.22; 'dec': 0.23; 'header:In-Reply-To:1': 0.24; 'sort': 0.25; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'about.': 0.29; 'anyone': 0.32; 'received:google.com': 0.35; 'replaced': 0.35; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'received:209.85.213': 0.37; 'doing': 0.38; 'received:209': 0.38; 'does': 0.39; '30,': 0.63; 'talking': 0.67; 'smith': 0.76; 'truth': 0.79; 'subject:get': 0.81; 'chrisa': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=3ixaTOh0Y17lpJlZ2jVLtvLqRBS9P7Q+ZnTtAyYSERQ=; b=xANPTFKwpfZ25njKKMg6JaHoaAKGcWWdbClyKAs7l6xwORaeBrCCo06MgPK7ZPnxws aBahfWm5zsx6/55ukQOxG9VJlx50NKHPG/eOSgnRnyTH1596jojDZqfB7OPb1tE+9aX5 z9fWao2Pi1lR9E6slJGl8CV8kWTIaUEQPMfT5jx3zYNeXGMdr+80zZij9qpA3snYzhqs XxTpwH92ufagTC4OWB5lDjYyAffuIrdy+Bglo3mUXF3t3FaBt34KkkDoF9xzOA8urUQr KKjYJRfOYiSG6e1mMzt1n5lPJ+dVkVd01MeL7DKqLVaA1HVsei6mzAF/jjJfWHlFX5EY YBmw==
X-Received by 10.50.28.19 with SMTP id x19mr63143849igg.92.1451476736919; Wed, 30 Dec 2015 03:58:56 -0800 (PST)
In-Reply-To <n60gfk$b0t$1@dont-email.me>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:100983

Show key headers only | View raw


On Wed, Dec 30, 2015 at 10:51 PM, Charles T. Smith
<cts.private.yahoo@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

how to get names of attributes "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2015-12-30 11:51 +0000
  Re: how to get names of attributes Chris Angelico <rosuav@gmail.com> - 2015-12-30 22:58 +1100
  Re: how to get names of attributes "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2015-12-30 12:16 +0000
    Re: how to get names of attributes Chris Angelico <rosuav@gmail.com> - 2015-12-30 23:34 +1100
  Re: how to get names of attributes "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2015-12-30 12:40 +0000
    Re: how to get names of attributes Chris Angelico <rosuav@gmail.com> - 2015-12-30 23:50 +1100
      Re: how to get names of attributes "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2015-12-30 13:31 +0000
        Re: how to get names of attributes Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-30 14:16 +0000
        Re: how to get names of attributes Chris Angelico <rosuav@gmail.com> - 2015-12-31 00:45 +1100
    Re: how to get names of attributes Random832 <random832@fastmail.com> - 2015-12-30 12:04 -0500
    Re: how to get names of attributes Chris Angelico <rosuav@gmail.com> - 2015-12-31 09:26 +1100
  Re: how to get names of attributes Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-30 14:10 +0000
    Re: how to get names of attributes "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2015-12-30 14:50 +0000
  Re: how to get names of attributes Steven D'Aprano <steve@pearwood.info> - 2015-12-31 10:58 +1100
    Re: how to get names of attributes "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2015-12-31 10:46 +0000

csiph-web