Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8058
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Do we still need to inherit from "object" to create new-style classes? |
| References | <a99ab9f2-dfde-4107-a26d-7720bf6bf6d8@f7g2000yqf.googlegroups.com> |
| Date | 2011-06-21 12:41 +1000 |
| Message-ID | <8762nzrjnl.fsf@benfinney.id.au> (permalink) |
| Organization | Unlimited download news at news.astraweb.com |
John Salerno <johnjsal@gmail.com> writes: > I can't quite seem to find the answer to this anywhere. The book I'm > reading right now was written for Python 3.1 and doesn't use (object), > so I'm thinking that was just a way to force new-style classes in 2.x > and is no longer necessary in 3.x. Is that right? Not as far as I know. Python 2.x classes will not inherit from anything unless you make them do so explicitly. -- \ “People demand freedom of speech to make up for the freedom of | `\ thought which they avoid.” —Soren Aabye Kierkegaard (1813–1855) | _o__) | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Do we still need to inherit from "object" to create new-style classes? John Salerno <johnjsal@gmail.com> - 2011-06-20 18:26 -0700
Re: Do we still need to inherit from "object" to create new-style classes? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-06-20 18:33 -0700
Re: Do we still need to inherit from "object" to create new-style classes? John Salerno <johnjsal@gmail.com> - 2011-06-20 19:13 -0700
Re: Do we still need to inherit from "object" to create new-style classes? Ben Finney <ben+python@benfinney.id.au> - 2011-06-21 12:41 +1000
Re: Do we still need to inherit from "object" to create new-style classes? Terry Reedy <tjreedy@udel.edu> - 2011-06-21 13:30 -0400
csiph-web