You are viewing a single comment's thread. Return to all comments →
Python doesn't support interfaces(and doesn't need to). Python has powerful multiple inheritance anyways, so languages like Java which have single inheritance only have to cope by inculcating "implementable" interfaces.
What does this have to do with interfaces in OOP?
You are confusing Interfaces and GUI for the same thing
this cracked me up... xD
Interfaces in OO != Interfaces in GUI!!!
Why does this get deleted? I want to see what was downvoted. Does no one believe in freedom of speech anymore that even when something obviously bad is written and downvoted by many members of the community we can't see what is not generally accepted? I want to see how NOT to think and this doesn't help that I can't see what they said that was downvoted so much.
I remember this.
The guy was talking about GUI interfaces which has nothing to do with interfaces in object oriented programming.
He probably deleted his own comment, don't know.
They could have used the closest thing to interfaces in Python, i.e. Abstract Base Classes.
There was already an exercise for that though.
"powerful multiple inheritance" which is more often abused than drugs leading to some of the most ridiculously structured and embarasing code. Responsible developers of other languages which support MI (like C++) caution against it's misuse; way too easy to go around shooting yourself in the foot.
I've actually used interfaces with Python. It's just creating a class that only has methods, and make sure not to initialize it, just inherit the methods. They are called mixins no?
Intefaces has totally different purposes than multiple inheritance. It's an important part of big project development. Interfaces similar to abstract classes, but has some difference for specific purposes. Interfaces more flexible than abstract classes, but still preserve implementation of some methods in inhereted class.
in python interfaces are supported they are implicit though we could have built something equivelent it just would not be typed as an interface.
C++ has powerfull multiple inheritance too, but It don't thow away interfaces!