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

OR operator not implemented? #34

Closed
sts10 opened this issue Jan 30, 2023 · 1 comment
Closed

OR operator not implemented? #34

sts10 opened this issue Jan 30, 2023 · 1 comment

Comments

@sts10
Copy link
Contributor

sts10 commented Jan 30, 2023

Is an "OR" operator ready to use? I tried | and it seems to work some of the time, but not always:

a = 22
if a < 10 | a > 20:
    print "a is NOT between 10 and 20"
else: 
    print "I don't know what a is"

I'd expect the above code to print "a is NOT between 10 and 20", but playground prints "I don't know what a is".

I'll note that the following works as expected:

a = 22
if a < 10:
    print "a is less than 10"
if a > 20:
    print "a is greater than 20"
else: 
    print "I don't know what a is"

And thus I suspect this is an issue with the OR logic. Apologies if it's just not implemented yet -- it's not mentioned in the Docs at the moment.

@sts10
Copy link
Contributor Author

sts10 commented Jan 30, 2023

Whoops, or operator seems to be just or. My bad.

@sts10 sts10 closed this as completed Jan 30, 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

No branches or pull requests

1 participant