Fork me on GitHub
#other-languages
<
2023-02-01
>
Juλian (he/him)08:02:04

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.

👍 2