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


Groups > comp.lang.python > #100987

Re: how to get names of attributes

Path csiph.com!news.swapon.de!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 23:50:03 +1100
Lines 23
Message-ID <mailman.69.1451479806.11925.python-list@python.org> (permalink)
References <n60gfk$b0t$1@dont-email.me> <n60jb6$hln$2@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de pLns5u3vsntJfDf6jfK4PgU2O7UqAdHnnv/9wmqI4sJw==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'true,': 0.04; 'classes.': 0.07; 'cc:addr:python-list': 0.09; 'object)': 0.09; 'wed,': 0.15; '"by': 0.16; '"def"': 0.16; 'dictionaries': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'new-style': 0.16; 'objects?': 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; 'doc': 0.22; 'dec': 0.23; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; 'referenced': 0.29; 'classes': 0.30; 'class.': 0.30; 'received:google.com': 0.35; 'there': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'still': 0.40; 'default': 0.61; '30,': 0.63; 'believe': 0.66; 'smith': 0.76; '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=eFkgzvGAX+ZYqgl9HK/pLCPPoXeswCpum/nRo53I2+c=; b=rnim60rnF5uDjQzN4QED9xI0/BoUvu/RpFAgNuHFUgVqXSVzvfVSzPz+sHyOehcYA/ ByTH/IXXq5dMJZkVyq7QEesYaZJVahcHtFuS5hGupY9hJFiYw3wYfWZg7ajxm8T1YpBv 0BZkU6kvvSmdU7gcg5gncks3Qmd9dHvKmgVL2Kodu7EZTZeFPdzOU5BEPNyNAAUwvs0X BNT4fVxe/5M3Lr9S9QTCpOsFiC4BMCJlfUxaxL2+fsglIh0Gf//FNQfxvKPvpyuE61/w Ce5vOT703jdl2/HZ6JXS7O/txghz8xzbSMcENXOmst7okyg7OLKCNicNj14F8KOh85ii 0Y0g==
X-Received by 10.107.47.162 with SMTP id v34mr14578778iov.19.1451479803264; Wed, 30 Dec 2015 04:50:03 -0800 (PST)
In-Reply-To <n60jb6$hln$2@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:100987

Show key headers only | View raw


On Wed, Dec 30, 2015 at 11:40 PM, Charles T. Smith
<cts.private.yahoo@gmail.com> wrote:
> Oh!
>
> Although the referenced doc says:
>
>   "For compatibility reasons, classes are still old-style by default."
>
> is it true that dictionaries are by default always new-style objects?
>
>   (PDB)c6 = { "abc" : 123, "def" : 456}
>
>   (PDB)isinstance (c6, dict)
>   True
>
>   (PDB)isinstance (c6, object)
>   True

I believe that's true, yes. The meaning of "by default" there is that
"class X: pass" will make an old-style class. All built-in types are
now new-style classes.

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