Re: Super() confusion

2009-02-10 Thread Gabriel Genellina
En Tue, 10 Feb 2009 03:26:20 -0200, Michele Simionato michele.simion...@gmail.com 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

Re: Super() confusion

2009-02-10 Thread Marc 'BlackJack' Rintsch
On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: Jean-Paul Calderone exarkun at 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

Re: Super() confusion

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

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 (this

Re: Super() confusion

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

Re: Super() confusion

2009-02-10 Thread Jean-Paul Calderone
On Tue, 10 Feb 2009 19:40:56 + (UTC), Benjamin Peterson benja...@python.org wrote: Marc 'BlackJack' Rintsch bj_666 at gmx.net writes: On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: Jean-Paul Calderone exarkun at divmod.com writes: Consider whether you really need to use

Re: Super() confusion

2009-02-10 Thread Daniel Fetchinson
On 2/9/09, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson fetchin...@googlemail.com 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

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, but just to repeat: one good

Re: Super() confusion

2009-02-10 Thread Paul Boddie
On 10 Feb, 20:45, Jean-Paul Calderone exar...@divmod.com 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

Re: Super() confusion

2009-02-10 Thread Gabriel Genellina
En Tue, 10 Feb 2009 18:01:53 -0200, Daniel Fetchinson fetchin...@googlemail.com escribió: On 2/9/09, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson fetchin...@googlemail.com escribió: Consider whether you really need to use super().

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, etc, etc. Not at all. It contains

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 better than python, my IDE is

Re: Super() confusion

2009-02-10 Thread Gabriel Genellina
En Wed, 11 Feb 2009 00:31:06 -0200, Benjamin Kaplan benjamin.kap...@case.edu 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

Re: Super() confusion

2009-02-10 Thread Michele Simionato
On Feb 10, 9:19 am, Gabriel Genellina gagsl-...@yahoo.com.ar 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

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

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): . .

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

Re: Super() confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel lionel.ke...@gmail.com 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]

Re: Super() confusion

2009-02-09 Thread Lionel
On Feb 9, 4:04 pm, Jean-Paul Calderone exar...@divmod.com wrote: On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel lionel.ke...@gmail.com 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

Re: Super() confusion

2009-02-09 Thread Chris Rebert
On Mon, Feb 9, 2009 at 4:18 PM, Lionel lionel.ke...@gmail.com wrote: On Feb 9, 4:04 pm, Jean-Paul Calderone exar...@divmod.com wrote: On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel lionel.ke...@gmail.com wrote: Hello. I've been scouring the web looking for something to clear up a little

Re: Super() confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 16:18:34 -0800 (PST), Lionel lionel.ke...@gmail.com wrote: On Feb 9, 4:04 pm, Jean-Paul Calderone exar...@divmod.com wrote: On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel lionel.ke...@gmail.com wrote: Hello. I've been scouring the web looking for something to clear up a

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 classobj What have

Re: Super() confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 17:19:41 -0800, Daniel Fetchinson fetchin...@googlemail.com 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]

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 classobj What have

Re: Super() confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 17:34:05 -0800, Daniel Fetchinson fetchin...@googlemail.com 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]

Re: Super() confusion

2009-02-09 Thread Benjamin Peterson
Jean-Paul Calderone exarkun at 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()

Re: Super() confusion

2009-02-09 Thread Gabriel Genellina
En Mon, 09 Feb 2009 23:34:05 -0200, Daniel Fetchinson fetchin...@googlemail.com 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]

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 Guido Tons of

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 is