Skip to content

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.

2 participants