Cú pháp @ trong python

Em xin chào các bác.
Em hiện tại mới học python để lập trình command line cho linux. Em tìm được ví dụ như sau:

import click

@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name',
          help='The person to greet.')
def hello(count, name):
    """Simple program that greets NAME for a total of COUNT times."""
    for x in range(count):
        click.echo('Hello %s!' % name)

 if __name__ == '__main__':
    hello()

Vậy cho em hỏi cú pháp @ đó là gì ạ? Các bác cho em keywork để em tìm hiểu với ạ. Thanks.

Decorator … 20 char

2 Likes

keyword: @classmethod python

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?