I'd like to be able to access some values of a python object using array-like syntax, ie:
obj = MyClass()
zeroth = obj[0]
first = obj[1]
Is this possible? If so, how do you implement this in the python class in question?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…