human
I am working on the file "20170913_python_decorator_contextmanager/decorator_and_contextmanager.ipynb".
The first task is:
Decorator assignment
Python 裏面所有的東西都是 Object, 既然是這樣那 decorator 應該也可以存成其他變數名稱並且正常使用
Can you write Python program for it?
 ... What is a the Python program you requested?
assistant
#Here is the Python program you requested.

from functools import wraps

def tag(name):
    def deco(func):
        @wraps(func)
        def wrapped(*args, **kwargs):
            print('<{}>'.format(name))
            func(*args, **kwargs)
            print('</{}>'.format(name))
        return wrapped
    return deco

tag_p = tag('p')

@tag_p
def content(*args, **kwargs):
    for i in args:
        print(i)

content('Hello World.', 'This is second argument.')