[Tutor] inheritance and super() function in python

Jorge Leon jorge.a.leon.g at gmail.com
Wed Apr 23 15:56:59 CEST 2014

>  class Cylinder(Obstacle):
>    def __init__(self,position, height, radius):
>        super(Obstacle,self).__init__(position)
> But it looks to me like the last line should be
>         super(Cylinder, self).__init__(position)

Hey, thanks again for the help and sorry about all the format errors I
was able to successfully use super(). The classes were made with the
old style (thanks Steve for the blog post). Using the last bit of
corrections the program successfully sourced the constructor from the
parent class.

Again, thank you for the prompt and professional response.


More information about the Tutor mailing list