[ create a new paste ] login | about

Link: http://codepad.org/4s7s640t    [ raw code | output | fork ]

Python, pasted on Aug 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def makebold(fn):
        def pacote():
            return "<b>" + fn() + "</b>"
        return pacote
    
def makeitalic(fn):
        def pacote():
            return "<i>" + fn() + "</i>"
        return pacote
    
@makebold
@makeitalic
def hello():
        return "Ol'a Mundo"
    
print hello() ## retorno <b><i>Ol'a Mundo</i></b>


Output:
1
<b><i>Ol'a Mundo</i></b>


Create a new paste based on this one


Comments: