I am having some problems generating a list for a class in Python. I know there is something simple I'm overlooking, but I just can't figure it out.
My basic code so far:
class Test:
def __init__(self,test):
self.__test = test
My problem is that if I enter
t = Test([1,3,5])
things will work just fine, but if I add
t = Test()
I get an error that I didn't enter enough parameters.
I've tried adding
def __init__(self,test=[])
as a default parameter, which sort of works, but then I don't have unique lists.
I've been looking all over and I can't quite figure out what I'm doing wrong. Any help would be greatly appreciated.