Skip to content
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

Use defaults args for range() #1613

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Use defaults args for range() #1613

merged 1 commit into from
Jan 6, 2024

Conversation

plajjan
Copy link
Contributor

@plajjan plajjan commented Jan 6, 2024

Since we haven't previously supported default arguments values, all calls to range() have been of the explicit 3 arg kind. Now that we do support default arguments we opt to use the more concise 1 and 2 arg call of range where we rely on the default values, i.e.:

  range(0, foo, 1)

becomes:

  range(foo)

and:

  range(1, bar, 1)

becomes:

  range(1, bar)

@plajjan plajjan force-pushed the default-args-range branch from 6960436 to 3b3b8b0 Compare January 6, 2024 08:49
Since we haven't previously supported default arguments values, all
calls to range() have been of the explicit 3 arg kind. Now that we do
support default arguments we opt to use the more concise 1 and 2 arg
call of range where we rely on the default values, i.e.:

  range(0, foo, 1)

becomes:

  range(foo)

and:

  range(1, bar, 1)

becomes:

  range(1, bar)
@plajjan
Copy link
Contributor Author

plajjan commented Jan 6, 2024

Part of #102.

@plajjan plajjan merged commit 0c16e8b into main Jan 6, 2024
23 checks passed
@plajjan plajjan deleted the default-args-range branch January 6, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant