From f1204bdf39a8e124c80638e6fcc5fb544bec4371 Mon Sep 17 00:00:00 2001 From: Carlos Ramos Date: Sat, 4 Jul 2020 23:53:29 -0500 Subject: [PATCH] solucion 1,2,3 de los decoredaores --- html_decorators.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..1d66e74 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,22 +1,24 @@ def div(func): - # You have to code here! - pass - + def wrapper(*args): + return f'
{func(*args)}
' + return wrapper def article(func): - # You have to code here! - pass - + def wrapper(*args): + return f'
{func(*args)}
' + return wrapper -def p(func): - # You have to code here! - pass +def p(func): + def wrapper(*args): + return f'

{func(*args)}

' + 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?'