A
Alexander Stante
Hello,
I have the following problem. I want to subclass from the pygame class
Surface, but I can't get it working:
class sprite(Surface):
def __init__(self, image_array, palette):
"some code here"
when I want to create a instance with:
gfx.sprite(arrayi, palette)
I get the following error message:
TypeError: argument 1 must be sequence of length 2, not 100
It seems that the constructor of Surface is not overrided by the one in
sprite, but why?
I have the following problem. I want to subclass from the pygame class
Surface, but I can't get it working:
class sprite(Surface):
def __init__(self, image_array, palette):
"some code here"
when I want to create a instance with:
gfx.sprite(arrayi, palette)
I get the following error message:
TypeError: argument 1 must be sequence of length 2, not 100
It seems that the constructor of Surface is not overrided by the one in
sprite, but why?