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

Mention order of operations #18

Closed
NeilGirdhar opened this issue Aug 4, 2023 · 3 comments
Closed

Mention order of operations #18

NeilGirdhar opened this issue Aug 4, 2023 · 3 comments

Comments

@NeilGirdhar
Copy link
Collaborator

And has higher precedence than or, so intersection should have higher precedence than union.

@kmillikin
Copy link
Collaborator

That's conveniently what we get from & and |.

@NeilGirdhar
Copy link
Collaborator Author

True. Should we mention it in the PEP or is it obvious enough?

@kmillikin
Copy link
Collaborator

I think it's worth mentioning that it's a consequence of Python's operator precedence. No reason to leave a doubt about the PEP author's intention.

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

3 participants