Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:" ': 0.03; '2.x': 0.05; 'python': 0.08; '3.x': 0.09; 'object.': 0.09; 'subclass': 0.09; 'subject:create': 0.09; 'subject:object': 0.09; 'pm,': 0.10; 'written': 0.14; 'wrote:': 0.14; 'altogether,': 0.16; 'new-style': 0.16; 'old-style': 0.16; 'subject:classes': 0.16; 'mon,': 0.17; "hasn't": 0.19; 'header:In-Reply-To:1': 0.21; 'subject:need': 0.22; "doesn't": 0.25; 'classes': 0.26; 'object': 0.26; 'says': 0.27; 'thanks.': 0.27; "i'm": 0.27; 'message-id:@mail.gmail.com': 0.28; '(the': 0.28; 'subject:?': 0.29; 'explicitly': 0.29; 'rid': 0.29; 'updated': 0.29; 'elsewhere': 0.30; 'seem': 0.32; "can't": 0.32; 'to:addr:python-list': 0.33; 'thinking': 0.34; 'force': 0.34; 'yet,': 0.35; 'quite': 0.36; 'subject:new': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.37; '20,': 0.37; 'subject:from': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'got': 0.39; 'to:addr:python.org': 0.39; 'john': 0.62; 'website': 0.66; 'anywhere.': 0.84; 'anymore,': 0.95 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 20 Jun 2011 18:33:38 -0700 Subject: Re: Do we still need to inherit from "object" to create new-style classes? From: Benjamin Kaplan To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-Junkmail-Status: score=10/49, host=mpv1.tis.cwru.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A020205.4DFFF4F3.007E,ss=1,fgs=0, ip=209.85.210.54, so=2010-12-23 16:51:53, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1308620023 news.xs4all.nl 49045 [::ffff:82.94.164.166]:42060 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8050 On Mon, Jun 20, 2011 at 6:26 PM, John Salerno wrote: > 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? > > (The documentation doesn't mention object anymore, but elsewhere on > the Python website it says the documentation hasn't been updated for > new-style classes yet, hence my confusion.) > > Thanks. 3.x got rid of old-style classes altogether, so you are correct- there's no need to explicitly subclass object.