Open charles-cooper opened 2 years ago
xs[start:end:step]
also work?start
, end
and step
in terms of their value? (constants, immutables, vars, etc.)I think we should disallow step
for now
the start
and end
args could have basically the same restrictions as slice
, but maybe also allow negative end (so xs[start:-1]
would be equivalent to slice(xs, start, len(xs) - start - 1)
👋 . Good first issue.
Simple Summary
Allow
xs[start:end]
instead ofslice(xs, start, len)
Motivation
It's more pythonic, less friction for new users.
Backwards Compatibility
We might want to deprecate slice.
Copyright
Copyright and related rights waived via CC0