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

[Bug] Expressions using Python's matrix multiplication operator highlighted as decorator #4667

Open
1 of 2 tasks
Tsche opened this issue Aug 31, 2024 · 0 comments
Open
1 of 2 tasks

Comments

@Tsche
Copy link

Tsche commented Aug 31, 2024

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.51.0#XQAAAAIwAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscqxB-B77H9Q9THIoLKcz1i5d20PZyLmqXXTWKyT1GfrJ3XAwToPtHwWASnqo0pHyQvtl4_6akIQ3DyrzBgpymGnY_jji3P1vsp5emiBptpJw5uXClnzkneYp-sxi3UrdSNu3fScLGvZT045b6hr9M_of4Gfj07xZRrn0PTcn5tL-LywJQ8-Def16L0XlruzwYRf-MajBh2s__wUC-dN0DHuRhFpeS2_WAlUqJUvTbPyE17kYmh2Or1dX5zajRirP64xFE

Monaco Editor Playground Code

x@y

Reproduction Steps

Use the matrix multiplication operator in a Python expression without placing a space after the operator.

Actual (Problematic) Behavior

a@b gets syntax highlighted as if @b were a decorator. It is not.

Expected Behavior

a@b being syntax highlighted the same as a @ b since whitespace does not change meaning there.

Additional Context

https://peps.python.org/pep-0465/ relevant pep
https://python.godbolt.org/z/devGMWf11 actual usage example. Compiler Explorer uses Monaco.

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