Calling parent constructor with different argument list

pinkisntwell pinkisntwell at
Sat Aug 15 00:24:26 CEST 2009

class Vertex(tuple):

class Positioned_Vertex(Vertex):

    def __init__(self, a, b):

a=Positioned_Vertex((0,0,0), 1)

This gives:

TypeError: tuple() takes at most 1 argument (2 given)

It looks like the explicit call to Vertex.__init__ is never made and
Vertex.__init__ is implicitly called when a Positioned_Vertex is
created. Is there a way to work around this and call the constructor
with the intended argument list?

More information about the Python-list mailing list