开发者

Python @ (at) prefix in top level module code - What does it stand for? [duplicate]

开发者 https://www.devze.com 2023-02-17 04:43 出处:网络
This question already has answers here: Closed 10 years ago. Possible Duplicate: What does the @ symbol do in Python
This question already has answers here: Closed 10 years ago.

Possible Duplicate:

What does the @ symbol do in Python

I thought it would be a good idea to as this question 开发者_Go百科here since google outright ignores the @ character in a query.

What does the @ before an earlier declared function name do when used in the top level of a document, multiple times, just before def´s?

Example

As a follow up, is it still present in Python 3?


Those are decorators

... and yes they're present in Python 3, see ... Python 3 primer, Part 2: Advanced topics

0

精彩评论

暂无评论...
验证码 换一张
取 消