From anonymous, 3 Weeks ago, written in Python.
Embed
  1. class say:
  2.  
  3.     def __init__(self, text):
  4.         self._text = text
  5.  
  6.     def __call__(self, func):
  7.         def wrapped(*args, **kwargs):
  8.             print(self._text)
  9.             return func(*args, **kwargs)
  10.  
  11.         return wrapped