class SomeClass(object):
def __init__(self, key_text_pairs = None):
.....
for key, text in key_text_pairs:
......
......
x = SomeClass([(1, "abc",), (2, "fff",)])
The value of key_text_pairs inside the init is None even if I pass a list as in the above statement. Why is it so??
I want to write a generic init which can take all iterator objects...
Thanks
Edit: oops.. I wanted to pass key value pair in the form of tuple... I was just trying to create a toy example.. I am still seeing the same behavior