2023-07-06 23:09:49 +08:00

11 lines
129 B
Python

class Test:
def __getitem__(self, key):
return key
t = Test()
assert t[1] == 1
assert t['a'] == 'a'
print("PASS")