I need variable instances that by default have tuple behavior. Initially it must be exactly (1,1) That's why I've created the class that inherits from the tuple class. But a new created object initially equals to (,) (not (1,1) as I need).
I have following code but it doesn't work properly as I want.
class FooClass(tuple):
def __init__(self):
self = (1,1)
I need that new created objects works like this:
t = FooClass() # t must be (1,1) now
t = t[:-1] + (t[-1]+1,)
#t now must be (1,2)
What I do wrong?