473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Does Python have Multiple Inheritance ?

Wikipedia says Python has Multiple Inheritance, is this true ?

http://en.wikipedia.org/wiki/Multiple_inheritance

Thanks,

Aaron
Nov 7 '08 #1
10 4356
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?

http://en.wikipedia.org/wiki/Multiple_inheritance
Yes

Nov 7 '08 #2
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?

http://en.wikipedia.org/wiki/Multiple_inheritance

Thanks,

Aaron
Good grief. You can use Wikipedia but you can't use Google?

http://www.google.co.uk/search?q=pyt...le+inheritance

TJG
Nov 7 '08 #3
In article <ma**************************************@python.o rg>,
Tim Golden <ma**@timgolden.me.ukwrote:
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?

http://en.wikipedia.org/wiki/Multiple_inheritance

Thanks,

Aaron

Good grief. You can use Wikipedia but you can't use Google?

http://www.google.co.uk/search?q=pyt...le+inheritance

TJG
Think of it this way:

Aaron is-a WikipediaUser
Aaron is-a GoogleUser

see, multiple inheritance!
Nov 7 '08 #4
On Nov 7, 3:50*pm, Tim Golden <m...@timgolden.me.ukwrote:
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?
* *http://en.wikipedia.org/wiki/Multiple_inheritance
Thanks,
Aaron

Good grief. You can use Wikipedia but you can't use Google?

http://www.google.co.uk/search?q=pyt...le+inheritance

TJG
It seems the OP cannot even use Wikipedia. Between the links to the
page he cites
there is http://en.wikipedia.org/wiki/C3_linearization, which is the
way Multiple Inheritance is implemented in Python.
Nov 7 '08 #5
On Nov 7, 4:38*pm, Tim Golden <m...@timgolden.me.ukwrote:
Seriously, though, although Python does indeed support multiple inheritance,
I have the impression from comments over the years that it's used a lot less
than in other languages where it is more of a common idiom. Certainly in my
own (not negligible) use of Python, I've very rarely used it for anything
but the occasional mixin class.

I'll leave others to comment on whether this is indeed so and why
it might be :)
The reason is that in Python using composition is very easy, so there
is little need for MI
(which is a Good Thing).
Nov 7 '08 #6
In message
<90**********************************@d42g2000prb. googlegroups.com>,
Michele Simionato wrote:
On Nov 7, 4:38Â*pm, Tim Golden <m...@timgolden.me.ukwrote:
>Seriously, though, although Python does indeed support multiple
inheritance, I have the impression from comments over the years that it's
used a lot less than in other languages where it is more of a common
idiom.

The reason is that in Python using composition is very easy, so there
is little need for MI
(which is a Good Thing).
Not to mention duck typing, which does away with the need for inheritance
altogether.
Nov 7 '08 #7
Lawrence D'Oliveiro wrote:
In message
<90**********************************@d42g2000prb. googlegroups.com>,
Michele Simionato wrote:
>On Nov 7, 4:38 pm, Tim Golden <m...@timgolden.me.ukwrote:
>>Seriously, though, although Python does indeed support multiple
inheritance, I have the impression from comments over the years that it's
used a lot less than in other languages where it is more of a common
idiom.
The reason is that in Python using composition is very easy, so there
is little need for MI
(which is a Good Thing).

Not to mention duck typing, which does away with the need for inheritance
altogether.
That seems a somewhat extreme point of view.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Nov 7 '08 #8
In message <ma**************************************@python.o rg>, Steve
Holden wrote:
Lawrence D'Oliveiro wrote:
>In message
<90**********************************@d42g2000prb .googlegroups.com>,
Michele Simionato wrote:
>>On Nov 7, 4:38 pm, Tim Golden <m...@timgolden.me.ukwrote:

Seriously, though, although Python does indeed support multiple
inheritance, I have the impression from comments over the years that
it's used a lot less than in other languages where it is more of a
common idiom.

The reason is that in Python using composition is very easy, so there
is little need for MI (which is a Good Thing).

Not to mention duck typing, which does away with the need for inheritance
altogether.

That seems a somewhat extreme point of view.
Hey, I didn't design the language, I just use it. :)
Nov 8 '08 #9
Lawrence D'Oliveiro wrote:
In message <ma**************************************@python.o rg>, Steve
Holden wrote:
>Lawrence D'Oliveiro wrote:
>>In message
<90**********************************@d42g2000pr b.googlegroups.com>,
Michele Simionato wrote:

On Nov 7, 4:38 pm, Tim Golden <m...@timgolden.me.ukwrote:

Seriously, though, although Python does indeed support multiple
inheritance, I have the impression from comments over the years that
it's used a lot less than in other languages where it is more of a
common idiom.
The reason is that in Python using composition is very easy, so there
is little need for MI (which is a Good Thing).
Not to mention duck typing, which does away with the need for inheritance
altogether.
That seems a somewhat extreme point of view.

Hey, I didn't design the language, I just use it. :)
I'm with Steve. Multiple inheritance is still a "good" thing, especially for
mixin-classes. wxPython, for instance, wouldn't be nearly so flexible without it.

-Larry
Nov 9 '08 #10
In message <%l*******************@bignews6.bellsouth.net>, Larry Bates
wrote:
Lawrence D'Oliveiro wrote:
>In message <ma**************************************@python.o rg>, Steve
Holden wrote:
>>Lawrence D'Oliveiro wrote:

Not to mention duck typing, which does away with the need for
inheritance altogether.

That seems a somewhat extreme point of view.

Hey, I didn't design the language, I just use it. :)

I'm with Steve. Multiple inheritance is still a "good" thing, especially
for mixin-classes. wxPython, for instance, wouldn't be nearly so flexible
without it.
Sure. But Python doesn't _force_ you to do things that way.
Nov 16 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Hung Jung Lu | last post by:
Hi, I think Microsoft did look into Python when they designed C#. (E.g. they got rid of checked exceptions of Java.) However, they followed Java in avoiding multiple inheritance (MI), which is a...
2
by: Graham Banks | last post by:
Does using multiple inheritance introduce any more performance overhead than single inheritance?
20
by: km | last post by:
Hi all, In the following code why am i not able to access class A's object attribute - 'a' ? I wishto extent class D with all the attributes of its base classes. how do i do that ? thanks in...
47
by: Mark | last post by:
why doesn't .NET support multiple inheritance? I think it's so silly! Cheers, Mark
16
by: devicerandom | last post by:
Hi, I am currently using the Cmd module for a mixed cli+gui application. I am starting to refactor my code and it would be highly desirable if many commands could be built as simple plugins. ...
21
by: raylopez99 | last post by:
Well, contrary to the implication in my 2000 textbook on C# (public beta version), C# does allow multiple inheritance, so long as it's serially chained as follows: class derived02 : derived01 {...
18
by: GD | last post by:
Please remove ability to multiple inheritance in Python 3000. Multiple inheritance is bad for design, rarely used and contains many problems for usual users. Every program can be designed only...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.