10 4356
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).
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.
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/
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. :)
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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: Graham Banks |
last post by:
Does using multiple inheritance introduce any more performance overhead than
single inheritance?
|
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...
|
by: Mark |
last post by:
why doesn't .NET support multiple inheritance?
I think it's so silly!
Cheers,
Mark
|
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.
...
|
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
{...
|
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...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
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...
|
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)...
|
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....
|
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
|
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...
|
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...
| |