Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100993
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Charles T. Smith" <cts.private.yahoo@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: how to get names of attributes |
| Date | Wed, 30 Dec 2015 13:31:57 -0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 35 |
| Message-ID | <n60mcc$rtp$1@dont-email.me> (permalink) |
| References | <n60gfk$b0t$1@dont-email.me> <n60jb6$hln$2@dont-email.me> <mailman.69.1451479806.11925.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Wed, 30 Dec 2015 13:31:57 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="0be5e7774f1afa24fb74063d17265f8f"; logging-data="28601"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+APp1b3HxVlZ2zeXDl4cjD6YWWdEAXXI=" |
| User-Agent | Pan/0.133 (House of Butterflies) |
| Cancel-Lock | sha1:cdOV9x+AMHYS2zO5Qw0iX+3lQJU= |
| Xref | csiph.com comp.lang.python:100993 |
Show key headers only | View raw
On Wed, 30 Dec 2015 23:50:03 +1100, Chris Angelico wrote:
> 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
Okay, thank you. I'm trying to understand your program.
Unfortunately, I haven't gotten the same output you had, using python 2.6
or 2.7. Maybe I haven't been able to restore the indentation correctly
after having been filtered through pan(1).
I wonder what the difference is between vars() and items()
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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