Language design

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Jun 2 03:25:32 EDT 2015


On Tuesday 02 June 2015 07:45, TheDoctor wrote:

> On Wednesday, September 11, 2013 at 6:40:22 PM UTC-5, Steven D'Aprano
> wrote:
>> On Wed, 11 Sep 2013 14:30:54 -0700, Mark Janssen wrote:
>> 
>> > 1) It tried to make Object the parent of every class.
>> 
>> Tried, and succeeded.
> 
> Oh?  How about:
> 
> class superdict(dict):
>     """I'm going to extend the dict type to include extra methods."""
> 
> class mixin():
>    """Here we go."""
> 
> What is the parent of mixin?

Why don't you try for yourself and see?


py> class mixin():
...     """Here we go."""
... 
py> mixin.__bases__
(<class 'object'>,)
py> mixin.__base__
<class 'object'>
py> mixin.__mro__
(<class '__main__.mixin'>, <class 'object'>)





-- 
Steve




More information about the Python-list mailing list