typing question

Chris Angelico rosuav at gmail.com
Sat Aug 27 09:46:14 EDT 2011


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



More information about the Python-list mailing list