Please explain this python behavior
- by StackUnderflow
class SomeClass(object):
def __init__(self, key_text_pairs = None):
.....
for key, text in key_text_pairs:
......
......
x = SomeClass([1, 2, 3])
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