Co znamenají příkazy se zavináčem v Pythonu?
Třeba:
@urlrelay.url('^/hello_world$', 'GET')
def hello_world(environ, start_response):
...
@urlrelay.url('^/hello_world$', 'GET')
def hello_world(environ, start_response):
...
Odpovědi
Diskuze
https://edux.fit.cvut.cz/oppa/BI-PYT/prednasky/bi-pyt_p-11_dekoratory.pdf
@dekorátor
def moje_funkce():
...BLOK...
je zhruba totéž co:
def moje_funkce():
...BLOK...
moje_funkce = dekorátor(moje_funkce)