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

WIP: Refactor set item #19

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

WIP: Refactor set item #19

wants to merge 5 commits into from

Conversation

withrocks
Copy link

Discussion in relation to this PR: https://github.com/Molmed/genologics/pull/17/files

It's probably more clear to most readers to use this syntax here:

    value = 'true' if value else 'false'

than the old

    value = value and 'true' or 'false'

Given that value has one of three values, {True, False, None}, both
statements are equivalent.

This can be checked by executing:

all([(x and 'true' or 'false') ==
     ('true' if x else 'false') for x in {True, False, None}])
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