Repository navigation
Doc: Fix matrix multiplication grammar rule in expressions reference - #162723
Closed
anisayakmitra-in wants to merge 1 commit into
Closed
anisayakmitra-in wants to merge 1 commit into
anisayakmitra-in wants to merge 1 commit into
Conversation
In the python-grammar production list for m_expr, the '@' matrix
multiplication operator previously listed 'm_expr' on the right-hand
side instead of 'u_expr'. This fixes the rule to use 'u_expr', matching
the actual PEG grammar in Grammar/python.gram ('term @ factor') and
ensuring unambiguous left-associative multiplicative syntax.
Signed-off-by: ANISAYAK MITRA <266799942+anisayakmitra-in@users.noreply.github.com>
anisayakmitra-in
requested review from
AA-Turner and
willingc
as code owners
November 27, 2026 08:10
Documentation build overview
|
Member
|
Duplicate of #149281. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
Doc/reference/expressions.rstunder thepython-grammarproduction list form_expr, the@matrix multiplication operator listedm_expron the right-hand side (m_expr "@" m_expr) instead ofu_expr.This change updates the rule to
m_expr "@" u_expr, matching all other multiplicative operators (*,/,//,%) and aligning with the actual PEG grammar specification inGrammar/python.gram(term '@' factorwheretermcorresponds tom_exprandfactorcorresponds tou_expr).📚 Documentation-only change (no NEWS entry required).