Re: super(...).__init__() vs Base.__init__(self)

2006-02-12 Thread Jan Niklas Fingerle
Steven Bethard <[EMAIL PROTECTED]> wrote: > Jan Niklas Fingerle wrote: > > Steven Bethard <[EMAIL PROTECTED]> wrote: > >> Personally, I'd call the lack of the super calls in threading.Thread and > >> Base bugs. > > > > It can't be a bug since it wasn't a bug before super was introduced and > >

Re: super(...).__init__() vs Base.__init__(self)

2006-02-12 Thread Jan Niklas Fingerle
Tony Nelson <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Jan Niklas Fingerle <[EMAIL PROTECTED]> wrote: > > > ...Super is a good tool to use, when dealing with > > diamond shape inheritance. In any other case I would use the direct > > calls to the base classes. In fact, i've ye

Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, Jan Niklas Fingerle <[EMAIL PROTECTED]> wrote: > ...Super is a good tool to use, when dealing with > diamond shape inheritance. In any other case I would use the direct > calls to the base classes. In fact, i've yet to find a non-textbook-case > where I really need

Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Steven Bethard
Jan Niklas Fingerle wrote: > Steven Bethard <[EMAIL PROTECTED]> wrote: >> Personally, I'd call the lack of the super calls in threading.Thread and >> Base bugs. > > It can't be a bug since it wasn't a bug before super was introduced and > you don't wan't to break working Python-2.x-code. Just

Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Jan Niklas Fingerle
Steven Bethard <[EMAIL PROTECTED]> wrote: > Personally, I'd call the lack of the super calls in threading.Thread and > Base bugs. It can't be a bug since it wasn't a bug before super was introduced and you don't wan't to break working Python-2.x-code. > But __init__() is definitely a tricky c

Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Steven Bethard
Kent Johnson wrote: > Are there any best practice guidelines for when to use > super(Class, self).__init__() > vs > Base.__init__(self) > to call a base class __init__()? > [snip] > > 3. A third fix might be to change both Base and threading.Thread() to > call super(...).__init__(). This mig

Re: super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Michele Simionato
I remember there was somewhere a page called "super considered harmful", some googling should find it. It was discussing the issue you are alluding to, as well others. Also google in the newsgroup, there are lots of threads about super and its shortcomings. Michele Simionato -- http://mail.pyt

super(...).__init__() vs Base.__init__(self)

2006-02-09 Thread Kent Johnson
Are there any best practice guidelines for when to use super(Class, self).__init__() vs Base.__init__(self) to call a base class __init__()? The super() method only works correctly in multiple inheritance when the base classes are written to expect it, so "Always use super()" seems like ba