G
Gus Tabares
Hello all,
I'm trying to subclass array.array but having problems with a default
parameter in the init constructor. Example:
import array
class TestClass(array.array):
def __init__(self, array_type = "B"):
array.array(array_type)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in ?
temp = TestClass()
TypeError: array() takes at least 1 argument (0 given)
I think there is something that I'm not understanding here. Any help
is appreciated.
Thanks,
Gus
I'm trying to subclass array.array but having problems with a default
parameter in the init constructor. Example:
import array
class TestClass(array.array):
def __init__(self, array_type = "B"):
array.array(array_type)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in ?
temp = TestClass()
TypeError: array() takes at least 1 argument (0 given)
I think there is something that I'm not understanding here. Any help
is appreciated.
Thanks,
Gus