Re: [Tutor] Modify inherited methods

2010-04-28 Thread Walter Wefft
Emile van Sebille wrote: On 4/28/2010 3:20 AM Walter Wefft said... spir ☣ wrote: On Wed, 28 Apr 2010 07:53:06 +0100 Walter Wefft wrote: === class MyDict0(dict): pass class MyDict1(dict): def __init__(self, *args, **kw): pass class MyDict2(dict): def __init__

Re: [Tutor] Modify inherited methods

2010-04-28 Thread Walter Wefft
spir ☣ wrote: On Wed, 28 Apr 2010 07:53:06 +0100 Walter Wefft wrote: Steven D'Aprano wrote: > And for guru-level mastery, replace to call to dict.__init__ with ... nothing at all, because dict.__init__ doesn't do anything. > > > (Sorry, should have sent to list

Re: [Tutor] Modify inherited methods

2010-04-28 Thread Walter Wefft
Steven D'Aprano wrote: > And for guru-level mastery, replace to call to dict.__init__ with ... nothing at all, because dict.__init__ doesn't do anything. > > > (Sorry, should have sent to list). I don't understand this - it must do something: class MyDict1(dict): def __init__(self, *args,

Re: [Tutor] sqrt?

2010-04-24 Thread Walter Wefft
Kirk Z Bailey wrote: ok gang, My desktop runs 2.5, and for my college algebra I needed to do som quadratic equation work. This involves squareroots. So I fired uop the interactive idle and imported math. I then tried to play with sqrt. Nothing. Importing math does not import a sqrt function.