Comments (7)

It seems to lex a@b incorrectly. It still thinks @b is a decorator. It only works if you put the space, a @ b. Since @ is a multiplication-like operator, the space is not always used (and anyway, it's impossible for a@b to be a decorator).

Is checking if it's on a line before another decorator or function or class definition too context sensitive?

At any rate, just start of the line would go a long way. I didn't realize PEP 8 recommends breaking before operators. But on the other hand, I think that plus the space rule should be enough. No one puts a space before the @ for a decorator, and conversely,