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

matrix multiplication vs decorator #42

Open
anntzer opened this issue Feb 25, 2018 · 1 comment
Open

matrix multiplication vs decorator #42

anntzer opened this issue Feb 25, 2018 · 1 comment

Comments

@anntzer
Copy link
Contributor

anntzer commented Feb 25, 2018

Currently, something like

(foo
 @ bar)

incorrectly highlights bar as a decorator, when it is in fact an operand of a matrix multiplication (note that this code conforms to the "new" PEP8 which suggests breaking before operators).

While a general solution may be tricky, it seems reasonable to only highlight as decorators when the @ is immediately followed by a letter (or underscore), without spaces in between. Spaces after the @ in a decorator are legal, but I have never seen cases where they are used...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants