fork download
  1. def marker(mark='!'):
  2. def deck(f):
  3. def wrap(*args,**kwargs):
  4. return f(*args,**kwargs)+mark
  5. return wrap
  6. return deck
  7.  
  8. @marker()
  9. def doubler(s):
  10. return s+s
  11.  
  12. @marker(mark='%')
  13. def tripler(s):
  14. return s+s+s
  15.  
  16.  
  17. print(doubler('x'))
  18.  
  19. print(tripler('x'))
  20.  
  21. print(tripler('f'))
  22.  
  23. @marker(mark='^')
  24. def tripler(s):
  25. return s+s+s
  26.  
  27. print(tripler('c'))
  28.  
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
xx!
xxx%
fff%
ccc^