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: make passing colors as tuple safe #449

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

jjhw3
Copy link
Contributor

@jjhw3 jjhw3 commented Oct 3, 2023

Hi, sorry to raise this again, but it occurred to me that the previous solution would have nasty effects if you passed a generator in as an argument as it would loop through all the items in the generator. This is a safer implementation thanks to short-circuit evaluation.

@andrzejnovak
Copy link
Member

Hah, somehow I don't think that happens often, but thanks for catching it.

@andrzejnovak andrzejnovak changed the title Fix colors fix: make passing colors as tuple safe Oct 4, 2023
@andrzejnovak andrzejnovak merged commit 85d32a3 into scikit-hep:master Oct 4, 2023
7 checks passed
rpsimeon34 pushed a commit to rpsimeon34/mplhep that referenced this pull request Oct 4, 2023
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.

2 participants