更新时间:2023-11-08 13:40:34
行首的 @
符号用于类、函数和方法装饰器.
An @
symbol at the beginning of a line is used for class, function and method decorators.
在此处阅读更多信息:
您将遇到的最常见的 Python 装饰器是:
The most common Python decorators you'll run into are:
如果你在一行的中间看到一个 @
,那就是另一回事了,矩阵乘法.请参阅此答案,显示将 @
用作二元运算符.
If you see an @
in the middle of a line, that's a different thing, matrix multiplication. See this answer showing the use of @
as a binary operator.