An inheritance question: getting the name of the "one up" class
Michele Simionato
michele.simionato at gmail.com
Tue Mar 31 04:36:44 EDT 2009
On Mar 31, 5:13 am, "Nick" <mediocre_per... at hotmail.com> wrote:
> Oh, and while the gurus are at it, what would be the advantage (if any) of
> changing, say
> Primate.__init__(self)
> to
> super(Human, self).__init__()
What others said. In Python 3.0 you would have a bigger advantage,
since you can just
write
super().__init__()
without repetition.
I normally use super, because it is the recommended solution by Guido.
This is not to say that I am perfectly happy, by my gripe is more
against
multiple inheritance than against super itself.
More information about the Python-list
mailing list