Allow range(stop) with default start for override grammar#1664
Allow range(stop) with default start for override grammar#1664jieru-hu merged 2 commits intofacebookresearch:masterfrom
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. |
jieru-hu
left a comment
There was a problem hiding this comment.
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. |
omry
left a comment
There was a problem hiding this comment.
Thanks. Looking pretty good.
See comments.
|
Thank you, sorry for the delay. I implemented your suggestions. |
|
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