Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91874
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-06-02 11:08 -0700 |
| References | <522eb795$0$29999$c3e8da3$5496439d@news.astraweb.com> <mailman.270.1378935062.5461.python-list@python.org> <5230ff66$0$29988$c3e8da3$5496439d@news.astraweb.com> <a703cea2-ef76-4a47-81ba-3ddcbfcd2c06@googlegroups.com> <556d5a6d$0$11122$c3e8da3@news.astraweb.com> |
| Message-ID | <a0e03694-d03e-4062-971c-46d5567b5f92@googlegroups.com> (permalink) |
| Subject | Re: Language design |
| From | "Dr. Bigcock" <dreamingforward@gmail.com> |
On Tuesday, June 2, 2015 at 2:25:43 AM UTC-5, Steven D'Aprano wrote: > 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'>) > Python2.7: >>> type(mixin) <type 'classobj'> It's a special classobj in v2.7 which doesn't have any attributes like __base__ or __mro__. And yes, I'm bringing up old conversations, because don't you agree that it's better to return to old conversations than to re-create them all over again? --m
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Language design TheDoctor <dreamingforward@gmail.com> - 2015-06-01 14:45 -0700
Re: Language design Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-02 17:25 +1000
Re: Language design "Dr. Bigcock" <dreamingforward@gmail.com> - 2015-06-02 11:08 -0700
csiph-web