473,763 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remove multiple inheritance in Python 3000

GD
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 with single inheritance.

I also published this request at http://bugs.python.org/issue2667
Jun 27 '08 #1
18 1689
GD wrote:
Please remove ability to multiple inheritance in Python 3000.
I'm so happy *that's* a dead parrot, all right.

Stefan
Jun 27 '08 #2
GD schrieb:
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 with single inheritance.
Yes, sure. And that's why Java grew interfaces & it's class-diagrams are
hilariously complex. Because using single inheritance is so much better.

Diez
Jun 27 '08 #3
GD wrote:
Please remove ability to multiple inheritance in Python 3000.

Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.

Ah, one more:

"doctor, when I do this, it hurts!"

- "then don't do that!"

Stefan
Jun 27 '08 #4
Dnia Tue, 22 Apr 2008 04:07:01 -0700, GD napisa³(a):
Please remove ability to multiple inheritance in Python 3000.
Please send me 1 mln $.

I've always wanted to be rich and furthermore, I've got a lot of plans and
ideas how to spend that cash.
I also published this request at http://bugs.python.org/issue2667
I'll be not publishing the bug, as I don't want to leave trace, so that I
don't have to pay taxes.

With regards,
Cz@rny

Jun 27 '08 #5
GD a écrit :
Please remove ability to multiple inheritance in Python 3000.
Please dont.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Don't blame the tool for your unability to use it properly.
Every program can be designed only with single inheritance.
Every program can be implemented in machine code.

Jun 27 '08 #6
On Apr 22, 7:30 am, "Diez B. Roggisch" <de...@nospam.w eb.dewrote:
GD schrieb:
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 with single inheritance.

Yes, sure. And that's why Java grew interfaces & it's class-diagrams are
hilariously complex. Because using single inheritance is so much better.

I have a couple issues with this, though I wholeheartedly agree with
the sentiment:

1. Java didn't grow interfaces, they were there from the start.

2. Java interfaces solve a different problem than MI (used properly)
does: interfaces are there to make types polymorphic, whereas
inheritance's main use is to share behavior.
Too many people believe polymorphism is the only noble goal of OO. If
that were true, there'd be no reason for multiple inheritance, or
single inheritance for that matter. But in my opinion, minimizing
code redundancy by allowing classes to share behaviors is far more
useful and important. That's why I wholeheartedly favor MI: it allows
classes to share behavior with restraints.

Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.
Carl Banks
Jun 27 '08 #7
On Apr 22, 10:22*am, Carl Banks <pavlovevide... @gmail.comwrote :
Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.
Not really; composition is usually a better way to share functionality
and reduce redundancy than inheritance.

George
Jun 27 '08 #8
On Apr 22, 10:36 am, George Sakkis <george.sak...@ gmail.comwrote:
On Apr 22, 10:22 am, Carl Banks <pavlovevide... @gmail.comwrote :
Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.

Not really; composition is usually a better way to share functionality
and reduce redundancy than inheritance.
I should have known this was coming. I disagree: inheritance is a
much better way to share behavior. Use inheritance by default,
composition if you have to. (Or composition when it actually reflects
a composition relationship, and not mere behavior sharing.)

With composition you're burdening the user with having to learn the
shared relationships that ought to be implementation details of the
class. E.g.,

obj.action_styl e.perform_actio n()

With inheritance, the user doesn't have to worry about these
relationships.

obj.perform_act ion()

It's better to isolate complexity (which inheritance does) than to
spread it out (which composition does).
Carl Banks
Jun 27 '08 #9
I have a couple issues with this, though I wholeheartedly agree with
the sentiment:

1. Java didn't grow interfaces, they were there from the start.
I might have expressed myself wrong here - I should have written "needed
to introduce interfaces (right from the start)"
2. Java interfaces solve a different problem than MI (used properly)
does: interfaces are there to make types polymorphic, whereas
inheritance's main use is to share behavior.
But the *goal* of the polymorphy is mainly to have shared behavior. And
matter of factly e.g. in swing, you use inner classes that implement
most of the behavior you want, and override the few points where you
want differences - and then clumsily delegate to that inner class all
your interface-methods.

Diez
Jun 27 '08 #10

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

Similar topics

7
3292
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 great leap backward from C++, in my opinion. I understand the why of avoiding virtual data members, since performance is an issue. I understand the problems of MI in C++. But the cure (using interfaces) seems worse than the disease itself. Now...
3
2008
by: Taki Jeden | last post by:
Hi I'm trying to install a certain python program which uses gtk, and the following line: class view_tree_model(gtk.GenericTreeModel,gtk.TreeSortable): raises a "TypeError: multiple bases have instance lay-out conflict" Is this a bug in gtk, or python-gtk, or something? I know of people who run this program, so I guess sthg must be wrong in my system.
20
10084
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 advance for enlightment ... here's the snippet #!/usr/bin/python
14
1641
by: beliavsky | last post by:
At http://www-03.ibm.com/developerworks/blogs/page/davidmertz David Mertz writes "Presumably with 2.7 (and later 2.x versions), there will be a means of warning developers of constructs that are likely to cause porting issues . In the simplest case, this will include deprecated functions and syntax constructs. But presumably the warnings may cover "potential problems" like the above example." The current beta version of Python is 2.5...
16
2943
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. My idea was: - Load a list of plugin names (i.e. from the config file, or from the plugins directory) - Import all plugins found dynamically:
0
1153
by: Guido van Rossum | last post by:
python-list@python.org] The first Python 3000 release is out -- Python 3.0a1. Be the first one on your block to download it! http://python.org/download/releases/3.0/ Excerpts: Python 3000 (a.k.a. "Py3k", and released as Python 3.0) is a new
10
4392
by: Aaron Gray | last post by:
Wikipedia says Python has Multiple Inheritance, is this true ? http://en.wikipedia.org/wiki/Multiple_inheritance Thanks, Aaron
0
9566
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9389
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10149
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10003
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9943
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9828
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7370
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5410
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3529
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.