单项选择题

在Python中,如何创建一个装饰器?()

A.def decorator(func)
B.@decorator
C.with decorator
D.A和B都对