On Mon, 24 Apr 2017 10:10 pm, id23...@gmail.com wrote:
> I do not quite understand how inheritance works in Python.
[...]
> class mainCL():
> def __init__(self):
> self.path1 = "/a"
> self.path2 = "/b"
>
> class secondCL(mainCL):
> def __init__(newID):
> self
I do not quite understand how inheritance works in Python.
I use python 3.6.1.
Let say I have a directory structure /a, /b. These two paths described
in main class.
The second class describes additional structure in one of the main
structures, say on /b and it should look like this:
/b/id1
/b/i
Nick Stinemates <[EMAIL PROTECTED]> writes on Thu, 24 Apr 2008 08:26:57 -0700:
> On Tue, Apr 22, 2008 at 04:07:01AM -0700, GD wrote:
> > Please remove ability to multiple inheritance in Python 3000.
I hope your request will not be followed.
> > Multiple inheritance is bad fo
On Apr 25, 2:03 pm, Bjoern Schliessmann wrote:
> > That's how the Java designers were thinking as well: If MI is
> > allowed, programmers will suddenly get an irresistible urge to use
> > MI to write unmaintainable spaghetti code. So let's disallow MI
> > for the sake of common good.
>
> Argument
sturlamolden wrote:
> On Apr 22, 1:07 pm, GD <[EMAIL PROTECTED]> wrote:
>> Multiple inheritance is bad for design, rarely used and contains
>> many problems for usual users.
>>
>> Every program can be designed only with single inheritance.
>
> That's how the Java designers were thinking as well:
sturlamolden wrote:
On Apr 22, 1:07 pm, GD <[EMAIL PROTECTED]> wrote:
Please remove ability to multiple inheritance in Python 3000.
Too late for that, PEPs are closed.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Every program
On Apr 22, 1:07 pm, GD <[EMAIL PROTECTED]> wrote:
> Please remove ability to multiple inheritance in Python 3000.
Too late for that, PEPs are closed.
> Multiple inheritance is bad for design, rarely used and contains many
> problems for usual users.
>
> Every program can
On Tue, Apr 22, 2008 at 04:07:01AM -0700, 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.
>
> Every program can be designed only with single inheri
Carl Banks schrieb:
On Apr 22, 11:10 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
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
On Apr 22, 11:10 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > 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 main
Carl Banks a écrit :
On Apr 22, 10:36 am, George Sakkis <[EMAIL PROTECTED]> wrote:
On Apr 22, 10:22 am, Carl Banks <[EMAIL PROTECTED]> wrote:
Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.
Not
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 sol
On Apr 22, 10:36 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Apr 22, 10:22 am, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > 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
On Apr 22, 10:22 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> 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 re
On Apr 22, 7:30 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> 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 user
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
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 t
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!&qu
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 & i
GD wrote:
> Please remove ability to multiple inheritance in Python 3000.
I'm so happy *that's* a dead parrot, all right.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
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
--
http
do I define new-style classes?
>
> - Edward
>
>
> Original Message Follows
> From: "Calvin Spealman" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: "Edward Waugh" <[EMAIL PROTECTED]>
> Subject: Re: Problem with operator over
On 9/17/06, Edward A. Waugh <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Consider the following code:
>
> import sys
>
> class FirstClass:
> def __init__(self, value):
> self.data = value
> def __add__(self, value):
> return FirstClass(self.data + value)
> def display(self):
>
Consider the following code:
import sys
class FirstClass: def
__init__(self, value): self.data =
""> def __add__(self,
value): return
FirstClass(self.data + value) def
display(self): print
self.data
class
SecondClass(FirstClass): def __add__(self,
24 matches
Mail list logo