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 yet to find a
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
you don't wan't to
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 bad
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
--
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 might break
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 case
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 because
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