-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py3: Adapt Sage's range-like functions #30121
Comments
comment:1
Initial list from a look at: sage: [x for x in dir() if 'range' in x] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:6
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
Branch: public/srange_as_iterator |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
comment:10
Making srange an iterator almost break every single file. Any volunteer to handle the fixes ? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
We meet the following issue:
|
comment:15
According to the Python 3 documentation for range:
Could we make |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:20
I agree with comment:14 - this is problematic. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:26
Can we just get rid of all |
This comment has been minimized.
This comment has been minimized.
I would suggest to add #31544 to the list of related issues. |
Python 2 had
range
(returning lists) andxrange
(returning iterators).Python 3 only has
range
which behaves like the oldxrange
.This ticket is to rename or change our range-like functions accordingly.
To go further we could make sure they all follow similar semantics, i.e.:
f(a)
for the range from0
included toa
excludedf(a, b)
for the range froma
included tob
excludedf(a, b, c)
for the range froma
included tob
excluded, by steps ofc
Functions in the global name space:
ellipsis_range
fibonacci_xrange
mrange
mrange_iter
prime_range
randrange
range
srange
sxrange
xmrange
xmrange_iter
xsrange
See also:
prime_range
should allow a stepprime_range
vsprimes
srange
is better thanrange
sage.misc.mrange.*mrange*
andcartesian_product_iterator
CC: @slel @tscrim @fchapoton
Component: python3
Keywords: range
Branch/Commit: public/srange_as_iterator @
3cee22e
Issue created by migration from https://trac.sagemath.org/ticket/30121
The text was updated successfully, but these errors were encountered: