Skip to content

Commit

Permalink
Fix typo (alignment) in PEP 657
Browse files Browse the repository at this point in the history
  • Loading branch information
wjandrea authored Dec 25, 2023
1 parent 89f5afb commit ba23f1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peps/pep-0657.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ This problem presents itself in the following situations.
Traceback (most recent call last):
File "test.py", line 1, in <module>
x = (a + b) @ (c + d)
ValueError: operands could not be broadcast together with shapes (1,2) (2,3)
ValueError: operands could not be broadcast together with shapes (1,2) (2,3)

There is no clear indication as to which operation failed, was it the addition
on the left, the right or the matrix multiplication in the middle? With this
Expand All @@ -115,7 +115,7 @@ This problem presents itself in the following situations.
File "test.py", line 1, in <module>
x = (a + b) @ (c + d)
~~^~~
ValueError: operands could not be broadcast together with shapes (1,2) (2,3)
ValueError: operands could not be broadcast together with shapes (1,2) (2,3)

Giving a much clearer and easier to debug error message.

Expand Down

0 comments on commit ba23f1b

Please sign in to comment.