Is this not infinite?

Kent Johnson kent at kentsjohnson.com
Tue Mar 7 02:39:33 CET 2006


John Salerno wrote:
>  From a book:
> 
> class Derived(Base):
>     def __init__(self, etc....):
>         self.__init__(self, etc...)

This should be
     def __init__(self, etc....):
         Base.__init__(self, etc...)

or possibly
     def __init__(self, etc....):
         super(Derived, self).__init__(etc...)

> Obviously I'm missing a piece of information that would help me to see 
> why the call gets passed back up to Base...

It's a typo in the book.

Kent



More information about the Python-list mailing list