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

Fix python mutable default argument anti-pattern #19028

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

jjyao
Copy link
Collaborator

@jjyao jjyao commented Oct 1, 2021

Why are these changes needed?

It is bad: https://florimond.dev/en/posts/2018/08/python-mutable-defaults-are-the-source-of-all-evil/

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@jjyao jjyao requested a review from rkooo567 October 1, 2021 00:01
@rkooo567
Copy link
Contributor

rkooo567 commented Oct 1, 2021

Windows failure should be unrelated

@rkooo567 rkooo567 merged commit d64872d into ray-project:master Oct 1, 2021
@jjyao jjyao deleted the jjyao/default branch October 1, 2021 04:06
@scv119
Copy link
Contributor

scv119 commented Oct 1, 2021

tricky stuff.
image

@edoakes
Copy link
Collaborator

edoakes commented Oct 1, 2021

lol excellent PR description @jjyao!

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.

4 participants