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


Groups > comp.lang.python > #12264

Re: typing question

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 <rosuav@gmail.com>
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 <CAEk9e3qF7LRnaFOU7bZSC5COnTr0v9Ch1B5pKT_9zTE1=12Y4w@mail.gmail.com>
References <CAEk9e3qF7LRnaFOU7bZSC5COnTr0v9Ch1B5pKT_9zTE1=12Y4w@mail.gmail.com>
Date Sat, 27 Aug 2011 23:46:14 +1000
Subject Re: typing question
From Chris Angelico <rosuav@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.462.1314452782.27778.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Sat, Aug 27, 2011 at 11:42 PM, Jason Swails <jason.swails@gmail.com> 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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: typing question Chris Angelico <rosuav@gmail.com> - 2011-08-27 23:46 +1000

csiph-web