Decorators must come on the line before a function definition, one decorator per line, and can't be on the same line as the def statement, meaning that ``@A def f(): ...`` is illegal.You can only decorate function definitions, either at the module level or inside a class; you can't decorate class definitions.