Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico 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: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 2+XaY6+fXMy5gRxJTyROMgGaT7TXTv39hcckDNQdDP3g== Return-Path: 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: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100983 On Wed, Dec 30, 2015 at 10:51 PM, Charles T. Smith 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