Skip to content

Parenthesize macro to avoid precedence issues#148062

Closed
bjourne wants to merge 1 commit intopython:mainfrom
bjourne:main
Closed

Parenthesize macro to avoid precedence issues#148062
bjourne wants to merge 1 commit intopython:mainfrom
bjourne:main

Conversation

@bjourne
Copy link
Copy Markdown

@bjourne bjourne commented Apr 4, 2026

This is an uber trivial fix. :)

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot bot commented Apr 4, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 4, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@picnixz
Copy link
Copy Markdown
Member

picnixz commented Apr 4, 2026

When would this cause an issue? I do not think we need to do this as it is code churn for now. Unless there macro is as a RHS of an operator of same-or-higher priority there should not be an issue.

Is this macro used in non trivial arithmetic/comparisons?

@bjourne
Copy link
Copy Markdown
Author

bjourne commented Apr 5, 2026

It would cause silent bugs if one were ever to write somexpr/QSBR_PAGE_MEM_LIMIT.

@picnixz
Copy link
Copy Markdown
Member

picnixz commented Apr 5, 2026

I know that but I wonder if we will ever need to do it. We tend to avoid changing code for the future especially if this is not needed. Where is the macro used in the file? if this is only used once, and that the code has not been changed since then, I would prefer not to make changes.

@bjourne
Copy link
Copy Markdown
Author

bjourne commented Apr 5, 2026

I disagree but this "discussion" is more annoying than it's worth.

@bjourne bjourne closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants