On Sat, Sep 21, 2013 at 10:17 AM, Peter Cacioppi
wrote:
> It's too bad, I really lean on reload(). It appears to be incompatible with
> inheritance more than one level deep.
Python's really not designed for reload of this nature. You can easily
make a nasty mess of things. If you're working in t
On Thursday, March 21, 2002 2:03:23 PM UTC-7, Marc wrote:
> I have classes defined in different files and would like to inherit
> from a class in file A.py for a class in file B.py but am running into
> problems. I'm using Python 1.5.2 on Windows NT
>
> Here's a specific example:
>
> ***
On Wed, 18 Sep 2013 20:38:10 -0400, Ned Batchelder wrote:
> super() takes a class and an instance for a reason. If you could use
> self.__class__ for the class, then it would only take the instance.
> Super() needs to know the instance, but also needs to know the class
> it's being called from.
Y
On 9/18/13 7:54 PM, Peter Cacioppi wrote:
This is a very old topic, but here is a trick for single inheritance. (The
problem you allude to isn't restricted to multiple inheritance).
Any class with a single parent simply defines this function.
def mySuper(self) :
return super(sel
One more comment - my trick has some utility with multiple inheritance, but you
really need to understand super() to and method resolution ordering in that
case (as, I suppose, you ought to whenever you cross the Rubicon beyond single
inheritance). So it's a nice trick but YMMV
On Wednesday, Se
This is a very old topic, but here is a trick for single inheritance. (The
problem you allude to isn't restricted to multiple inheritance).
Any class with a single parent simply defines this function.
def mySuper(self) :
return super(self.__class__, self)
And then any parent