super() woes (n00b)

Benjamin Kaplan benjamin.kaplan at case.edu
Thu Jun 17 14:26:20 EDT 2010


On Thu, Jun 17, 2010 at 10:51 AM, Matteo Landi <landimatte at gmail.com> wrote:
> I found few error in your code:
> 1 the constructor of P class seems to be wrong:
>
>>>> class P(object):
> ...    def __init__(self):
> ...        print("I am a member of class P")
> ...
>
> 2 super() works with new style classes, i.e.  the ones which inherit
> from 'object'
>

The OP is using Python 3.1. All classes in Python 3.x are new style.



More information about the Python-list mailing list