Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions html_decorators.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
def div(func):
# You have to code here!
pass
def new_func(*args, **kwargs):
content = '<div>'
content += func(args)
content += '</div>'
return content
return new_func


def article(func):
# You have to code here!
pass
def new_func(*args, **kwargs):
content = '<article>'
content += func(args)
content += '</article>'
return content
return new_func


def p(func):
# You have to code here!
pass
def new_func(*args, **kwargs):
content = '<p>'
content += func(args)
content += '</p>'
return content
return new_func


# Here you must apply the decorators, uncomment this later
Expand Down