Skip to content

Conversation

DominoPivot
Copy link

While Python supports range comparisons like a < b < c, it doesn't do anything special with the == operator, so in the comparison ask == ("y" or "yes"), the or evaluates first which results in ask == "y".

A simple fix is to use the in operator with a tuple: ask in ("y", "yes"). And hey, finally an occasion for me to test making a pull request on someone else's github :)

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