From c234bc7a451080253abeea2191cee476af5c6563 Mon Sep 17 00:00:00 2001 From: Andres Cendales Date: Mon, 22 Jun 2020 15:47:04 -0500 Subject: [PATCH] Solve --- html_decorators.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..38787b5 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,30 +1,27 @@ def div(func): - # You have to code here! - pass - + def wraper(*args, **kwargs): + return '
{}
'.format(func(*args, **kwargs)) + return wraper def article(func): - # You have to code here! - pass - + def wraper(*args, **kwargs): + return '
{}
'.format(func(*args, **kwargs)) + return wraper def p(func): - # You have to code here! - pass - - -# Here you must apply the decorators, uncomment this later -# @div -# @article -# @p + def wraper(*args, **kwargs): + return '

{}

'.format(func(*args, **kwargs)) + return wraper + +@div +@article +@p def saludo(nombre): return f'¡Hola {nombre}, ¿Cómo estás?' - def run(): print(saludo('Jorge')) - if __name__ == '__main__': run()