other-languages 2023-02-01

you could implement your own __getitem__ method to return an instance of your class. be aware that in Python 2, you'd have to use __getslice__ instead.

👍 1