Re: "Super()" confusion

2009-02-10 Thread Michele Simionato
On Feb 10, 9:19 am, "Gabriel Genellina" wrote: > You really should push them to be included in python.org, even in their   > unfinished form. (At least a link in the wiki pages). Their visibility is   > almost null now. It looks like I made an unfortunate choice with the title ("Things to Know ab

Re: "Super()" confusion

2009-02-10 Thread Gabriel Genellina
En Wed, 11 Feb 2009 00:31:06 -0200, Benjamin Kaplan escribió: On Tue, Feb 10, 2009 at 9:25 PM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: Okay, I think we converged to a common denominator. I agree with you that the documentation needs additions about super and I also agree with yo

Re: "Super()" confusion

2009-02-10 Thread Benjamin Kaplan
On Tue, Feb 10, 2009 at 9:25 PM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: > >>> Consider whether you really need to use super(). > >>> http://fuhm.net/super-harmful/ > > Because throwing around that link carries about the same amount of > information as "perl is

Re: "Super()" confusion

2009-02-10 Thread Daniel Fetchinson
>>> Consider whether you really need to use super(). >>> http://fuhm.net/super-harmful/ Because throwing around that link carries about the same amount of information as "perl is better than python", "my IDE is better than yours", "vim rulez!", "emacs is cooler than vim"

Re: "Super()" confusion

2009-02-10 Thread Gabriel Genellina
En Tue, 10 Feb 2009 18:01:53 -0200, Daniel Fetchinson escribió: On 2/9/09, Gabriel Genellina wrote: En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson escribió: Consider whether you really need to use super(). http://fuhm.net/super-harmful/ Because throwing around that link carries ab

Re: "Super()" confusion

2009-02-10 Thread Paul Boddie
On 10 Feb, 20:45, Jean-Paul Calderone wrote: > > It replaces one kind of repetition with another. I think each kind is > about as unpleasant. Has anyone gathered any data on the frequency of > changes of base classes as compared to the frequency of classes being > renamed? I don't think either

Re: "Super()" confusion

2009-02-10 Thread Daniel Fetchinson
> Consider whether you really need to use super(). > > http://fuhm.net/super-harmful/ Did you actually read that article, understood it, went through the tons of responses from python-dev team members, including Guido > > "Tons" of responses? This was mentioned already, bu

Re: "Super()" confusion

2009-02-10 Thread Daniel Fetchinson
On 2/9/09, Gabriel Genellina wrote: > En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson > escribió: > >> Hello. I've been scouring the web looking for something to clear up a >> little confusion about the use of "super()" but haven't found >> anything >> that really helps. Her

Re: "Super()" confusion

2009-02-10 Thread Jean-Paul Calderone
On Tue, 10 Feb 2009 19:40:56 + (UTC), Benjamin Peterson wrote: Marc 'BlackJack' Rintsch gmx.net> writes: On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: > Jean-Paul Calderone divmod.com> writes: >> Consider whether you really need to use super(). >> >> http://fuhm.net/sup

Re: "Super()" confusion

2009-02-10 Thread Benjamin Peterson
Marc 'BlackJack' Rintsch gmx.net> writes: > > On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: > > > Jean-Paul Calderone divmod.com> writes: > >> Consider whether you really need to use super(). > >> > >> http://fuhm.net/super-harmful/ > > > > This article chiefly deals with supe

Re: "Super()" confusion

2009-02-10 Thread Marc 'BlackJack' Rintsch
On Tue, 10 Feb 2009 02:11:10 -0800, Michele Simionato wrote: > Unfortunately there is no good solution. If you have a single > inheritance hierarchy and you do not use super, you make it impossible > for users of your hierarchy to subclass it by using multiple > inheritance in a cooperative way (t

Re: "Super()" confusion

2009-02-10 Thread Michele Simionato
On Feb 10, 10:42 am, Marc 'BlackJack' Rintsch wrote: > On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: > > Jean-Paul Calderone divmod.com> writes: > >> Consider whether you really need to use super(). > > >>http://fuhm.net/super-harmful/ > > > This article chiefly deals with super()'

Re: "Super()" confusion

2009-02-10 Thread Marc 'BlackJack' Rintsch
On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: > Jean-Paul Calderone divmod.com> writes: >> Consider whether you really need to use super(). >> >> http://fuhm.net/super-harmful/ > > This article chiefly deals with super()'s harm in multiple inteheritance > situations. For the simp

Re: "Super()" confusion

2009-02-10 Thread Gabriel Genellina
En Tue, 10 Feb 2009 03:26:20 -0200, Michele Simionato escribió: On Feb 10, 4:29 am, "Gabriel Genellina" > Honestly, I don't understand how this thing got so much out of > control. If anyone starts an intelligent question or remark about > super, this essay is thrown in no matter what. Anyone

Re: "Super()" confusion

2009-02-09 Thread Michele Simionato
On Feb 10, 4:29 am, "Gabriel Genellina" > AFAIK, all facts appearing in said article are still true (except for 3.x   > which uses a shorter form). If super usage had been clearly documented in   > the first place, this had not happened. > Perhaps you could point us to some resource explaining how

Re: "Super()" confusion

2009-02-09 Thread Steven D'Aprano
On Mon, 09 Feb 2009 17:34:05 -0800, Daniel Fetchinson wrote: ... Consider whether you really need to use super(). http://fuhm.net/super-harmful/ >>> >>>Did you actually read that article, understood it, went through the >>>tons of responses from python-dev team members, including Gu

Re: "Super()" confusion

2009-02-09 Thread Gabriel Genellina
En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson escribió: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: [snip] "super(Child,self).__init__(fil

Re: "Super()" confusion

2009-02-09 Thread Benjamin Peterson
Jean-Paul Calderone divmod.com> writes: > Consider whether you really need to use super(). > > http://fuhm.net/super-harmful/ This article chiefly deals with super()'s harm in multiple inteheritance situations. For the simple case, though, like that presented by the OP, I believe super() is perf

Re: "Super()" confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 17:34:05 -0800, Daniel Fetchinson wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: [snip] "super(Child,self).__init__(filePath) Ty

Re: "Super()" confusion

2009-02-09 Thread Daniel Fetchinson
Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: [snip] "super(Child,self).__init__(filePath) TypeError: super() argument 1 mus

Re: "Super()" confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 17:19:41 -0800, Daniel Fetchinson wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: [snip] "super(Child,self).__init__(filePath) Ty

Re: "Super()" confusion

2009-02-09 Thread Daniel Fetchinson
>>Hello. I've been scouring the web looking for something to clear up a >>little confusion about the use of "super()" but haven't found anything >>that really helps. Here's my simple example: >> >> [snip] >> >>"super(Child,self).__init__(filePath) >>TypeError: super() argument 1 must be type, not c

Re: "Super()" confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 16:18:34 -0800 (PST), Lionel wrote: On Feb 9, 4:04 pm, Jean-Paul Calderone wrote: On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel wrote: >Hello. I've been scouring the web looking for something to clear up a >little confusion about the use of "super()" but haven't found any

Re: "Super()" confusion

2009-02-09 Thread Chris Rebert
On Mon, Feb 9, 2009 at 4:18 PM, Lionel wrote: > On Feb 9, 4:04 pm, Jean-Paul Calderone wrote: >> On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel >> wrote: >> >Hello. I've been scouring the web looking for something to clear up a >> >little confusion about the use of "super()" but haven't found

Re: "Super()" confusion

2009-02-09 Thread Lionel
On Feb 9, 4:04 pm, Jean-Paul Calderone wrote: > On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel > wrote: > >Hello. I've been scouring the web looking for something to clear up a > >little confusion about the use of "super()" but haven't found anything > >that really helps. Here's my simple examp

Re: "Super()" confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: [snip] "super(Child,self).__init__(filePath) TypeErro

Re: "Super()" confusion

2009-02-09 Thread Scott David Daniels
Lionel wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath):... class Child(Parent): def __init__(sel

Re: "Super()" confusion

2009-02-09 Thread Robert Kern
On 2009-02-09 17:20, Lionel wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath): . .

"Super()" confusion

2009-02-09 Thread Lionel
Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath): . . Do some processing with "filePath"