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


Groups > comp.lang.python > #12264

Re: typing question

References <CAEk9e3qF7LRnaFOU7bZSC5COnTr0v9Ch1B5pKT_9zTE1=12Y4w@mail.gmail.com>
Date 2011-08-27 23:46 +1000
Subject Re: typing question
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.462.1314452782.27778.python-list@python.org> (permalink)

Show all headers | 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