Improve range: refactor, support start as an optional kwarg, clearer docs and error messages (#38041)
Mathematically a range is uniquely determined by three out of four of start, step, stop, length.
Furthermore if one assumes step=1 any combination of two others macthematically suffices to specify a range.
With this PR the range function reflects this. Any combination of three (two non step) arguments will be accepted.
Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
Co-authored-by: Johnny Chen <johnnychen94@hotmail.com>
Co-authored-by: Mark Kittisopikul <mkitti@users.noreply.github.com>
Co-authored-by: Matt Bauman <mbauman@juliacomputing.com>