2023-06-30 00:25:42 +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")