From 04ce5670011947e9cbfa24a9e45980f8a225deb9 Mon Sep 17 00:00:00 2001 From: Juan Tovar Date: Fri, 31 Jul 2020 17:49:33 -0700 Subject: [PATCH] =?UTF-8?q?Solved=20by=20Juan=20Jos=C3=A9=20Tovar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html_decorators.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..3e4ae07 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,22 +1,31 @@ def div(func): # You have to code here! - pass + def func_wrapper(*args, **kwargs): + return '
{}
'.format(func(*args, **kwargs)) + + return func_wrapper def article(func): # You have to code here! - pass + def func_wrapper(*args, **kwargs): + return '
{}
'.format(func(*args, **kwargs)) + + return func_wrapper def p(func): # You have to code here! - pass + def func_wrapper(*args, **kwargs): + return '

{}

'.format(func(*args, **kwargs)) + + return func_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?'