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
Currently, if you construct a Range from non-integers, both values are truncated to ints. For example, 1.2,3.9 gives the same result as 1,3, and -3.9,-1.2 gives the same result as -3,-1. Is this the desired behavior?
Do we always want to convert Range bounds to integers, or would it ever be useful to store a Range object with float bounds (regardless of how that is interpreted)?
In Python, you can't have a range with floats, but you can have a slice with floats... not sure what the use cases for that are.
Intuitively, it seems like the upper bound should represent "up to but not including"; shouldn't that mean that a Range with an upper bound of 3.9 should include 3, since it's up to but not including 3.9?
The text was updated successfully, but these errors were encountered:
Currently, if you construct a Range from non-integers, both values are truncated to ints. For example,
1.2,3.9
gives the same result as1,3
, and-3.9,-1.2
gives the same result as-3,-1
. Is this the desired behavior?range
with floats, but you can have aslice
with floats... not sure what the use cases for that are.3.9
should include3
, since it's up to but not including3.9
?The text was updated successfully, but these errors were encountered: