From 397d1ddc7ff288499f2fd00a59cfb9463d4c574a Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 7 Jun 2020 23:48:01 -0500 Subject: [PATCH 1/2] challenge solved --- html_decorators.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/html_decorators.py b/html_decorators.py index 8d9c421..1e0654d 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -1,21 +1,27 @@ def div(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + data = func(*args, **kwargs) + return f'
{data}
' + return wrapper def article(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + data = func(*args, **kwargs) + return f'
{data}
' + return wrapper def p(func): - # You have to code here! - pass + def wrapper(*args, **kwargs): + data = func(*args, **kwargs) + return f'

{data}

' + return wrapper # Here you must apply the decorators, uncomment this later # @div -# @article +@article # @p def saludo(nombre): return f'¡Hola {nombre}, ¿Cómo estás?' From 7e92aa5f01f78313ac210ad5f2875eaf78e1377b Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 7 Jun 2020 23:48:49 -0500 Subject: [PATCH 2/2] challenge solved* --- html_decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html_decorators.py b/html_decorators.py index 1e0654d..6e020f4 100644 --- a/html_decorators.py +++ b/html_decorators.py @@ -21,7 +21,7 @@ def wrapper(*args, **kwargs): # Here you must apply the decorators, uncomment this later # @div -@article +#@article # @p def saludo(nombre): return f'¡Hola {nombre}, ¿Cómo estás?'