You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice to have the full spectrum of range functions available in python, e.g. range(min, max).
This is tricky because in guppy we don't support function overloading, so range always has one argument.
If we implement default arguments, we could consider range to have the signature:
range(max: int, min: int=0, step: int=1)
to do this without overloading.
It may be easier for guppy to reason about indices that come directly from a range iterator than the alternative, i.e.:
foriinrange(3, len(xs)):
f(xs[i])
vs
foriinrange(len(xs)):
f(xs[i+3])
but maybe at this point it doesn't make a difference.
The text was updated successfully, but these errors were encountered:
It'd be nice to have the full spectrum of
range
functions available in python, e.g.range(min, max)
.This is tricky because in guppy we don't support function overloading, so range always has one argument.
If we implement default arguments, we could consider
range
to have the signature:to do this without overloading.
It may be easier for guppy to reason about indices that come directly from a
range
iterator than the alternative, i.e.:vs
but maybe at this point it doesn't make a difference.
The text was updated successfully, but these errors were encountered: