i ve some confusion with decorators | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

i ve some confusion with decorators

guys i m not able to understand why we define a wrapper function inside decorator function...cant we write the code in wrapper function directly in created decorator function

18th Feb 2020, 7:35 AM
PRO
PRO - avatar
1 Respuesta
0
The pattern/decorator can be used at any time, to wrap any function.
18th Feb 2020, 8:33 AM
Mihai Apostol
Mihai Apostol - avatar