-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Allow range(stop) with default start for override grammar #1664
Conversation
Thanks for the PR! It would be good to have a few more tests -- see the
|
Aaah, Thanks for the tips ! I was a bit fast in implementing this, didn't notice I had to also modify the parser. Let me modify the right files. Not sure about the float inputs, but for the other cases I would say the best is to compare to the default python range implementation:
|
Actually didn't need to change the parser. I added some tests and a new example in the docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit, otherwise lgtm. Thanks!
@omry could you take a look as well? |
Of course. but as I am in the middle of releasing 1.1 this will wait. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looking pretty good.
See comments.
Thank you, sorry for the delay. I implemented your suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks.
We have some existing CI failures we are looking at. Will likely need you to rebase once those are fixed to get CI green again. |
@victorjoos could you rebase master and force push to this branch? Many thanks! |
Motivation
To make the range function more like the default python range(), and easier to type, I added a check if only start was added to set stop to start and start to zero.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
tested by adding a parametrize argument in
test_basic_sweeper.py
.Related Issues and PRs
N/A