From 1ac8d571ad78ea67f870b6b51171d48615abc825 Mon Sep 17 00:00:00 2001 From: Dimanson perez Date: Fri, 24 Jul 2020 17:28:29 -0500 Subject: [PATCH] reto terminado --- html_decorators.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..313fb11 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,22 +1,31 @@ + +#esta forma solo se puede ejecutar un decorador a la vez + def div(func): # You have to code here! - pass + def wrapper(*args, **kwargs): + return f'
{func(*args, **kwargs)}
' + return wrapper def article(func): # You have to code here! - pass + def wrapper(*args, **kwargs): + return f'
{func(*args, **kwargs)}
' + return wrapper def p(func): # You have to code here! - pass + def wrapper(*args, **kwargs): + return f'

{func(*args, **kwargs)}

' + return wrapper # Here you must apply the decorators, uncomment this later -# @div -# @article -# @p +@div +#@article +#@p def saludo(nombre): return f'¡Hola {nombre}, ¿Cómo estás?'