Re: namedtuples anamoly

2018-10-19 Thread Vinodhini Balusamy
Thanks everyone for promptly answering my question. Answer to Gary's question, I haven't used named tuples and tried it. The way the tuple subclass getting created plus the property features i wasn't much aware of. But now i am very clear, how I set ID object and changed the interface to access I

namedtuples anamoly

2018-10-17 Thread Vinodhini Balusamy
Hi, I tried using namedtuples and just found a behaviour which I am not able to conclude as correct behaviour. from collections import namedtuple (n, categories) = (int(input()), input().split()) Grade = namedtuple('Grade', categories) Grade.ID = 1 #print(Grade.ID) ob = Grade(10, 50) print(ob.ID