Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'versions.': 0.07; 'python': 0.08; '11:42': 0.16; '3.2.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.16; 'subject:question': 0.18; 'jason': 0.21; "doesn't": 0.22; 'header :In-Reply-To:1': 0.22; 'received:209.85.213.46': 0.23; 'received :mail-yw0-f46.google.com': 0.23; 'pm,': 0.24; 'aug': 0.24; 'code': 0.25; 'fine': 0.26; 'sat,': 0.28; '27,': 0.29; 'message- id:@mail.gmail.com': 0.29; 'example': 0.30; '(since': 0.30; 'class': 0.30; 'version': 0.32; 'chris': 0.32; "can't": 0.33; 'there': 0.33; 'to:addr:python-list': 0.33; 'difference': 0.34; 'explicit': 0.34; 'object': 0.35; 'explain': 0.36; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'should': 0.38; 'subject:: ': 0.39; 'why': 0.39; 'to:addr:python.org': 0.39; 'your': 0.61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3Vhch/ohon0yZTmLALIEdUbHk49/PKbe+BV0SDEala0=; b=Lqdyv6SYaicBqZb4a8FmIfTjo3a/NlozG14yuEOQXzM9yMpOn+H4URyDvynZLXmhwv Q3yP67/5TJIqr93nQk9njsY+mrIAIm2dOMA9y7cURb+e+4/Z/OycqsYSeZYad4L81MWT 5steGfZEyTGB2FD2KCCtndTtnsApbDrQw2aZA= MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 27 Aug 2011 23:46:14 +1000 Subject: Re: typing question From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314452783 news.xs4all.nl 2500 [2001:888:2000:d::a6]:58621 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12264 On Sat, Aug 27, 2011 at 11:42 PM, Jason Swails wrote: > I can't explain this behavior (since doesn't every class inherit from object > by default? And if so, there should be no difference between any of my class > definitions). That is true in Python 3, but not in Python 2. That's why your example works perfectly in version 3.2. Be explicit about deriving from object and your code should work fine in both versions. Chris Angelico