[python] How to override the [] operator in Python?