How do decorators work in python? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How do decorators work in python?

Explane me please

20th Sep 2020, 10:24 PM
эŠ“уŠ°Ń€Š“ Š°Š½Š“рŠµŠµŠ²
эŠ“уŠ°Ń€Š“ Š°Š½Š“рŠµŠµŠ² - avatar
2 Respostas
+ 6
The "decorators" we talk about with concern to Python are not exactly the same thing as the DecoratorPattern. A Python decorator is a specific change to the Python syntax that allows us to more conveniently alter functions and methods (and possibly classes in a future version). This supports more readable applications of the DecoratorPattern but also other uses as well. source: https://wiki.python.org/moin/PythonDecorators
20th Sep 2020, 11:07 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar