◐ Shell
clean mode source ↗

Message 244819 - Python tracker

For prior art, it's worth taking a look at NumPy, and in particular its `s_` and `index_exp` functions:

>>> import numpy as np
>>> np.s_[1:2]
slice(1, 2, None)
>>> np.s_[0]
0
>>> np.s_[1:2, 3]
(slice(1, 2, None), 3)