Advertisement
Guest User

Untitled

a guest
Aug 18th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. class Funk(object):
  2. def __init__(self):
  3. pass
  4.  
  5. @Funky.funky
  6. def playMe(self, x, y, z):
  7. print "{x} {y} {z}".format(x=x, y=y, z=z)
  8. print "this" " works!"
  9.  
  10. class Funky(object):
  11. def __init__(self):
  12. pass
  13.  
  14. @staticmethod
  15. def funky(func):
  16. def fun(self, x, y, z):
  17. x = x ** 2
  18. y = y ** 2
  19. z = z ** 2
  20. return func(x, y, z)
  21. return fun;
  22.  
  23. if __name__ == "__main__":
  24. Funk().playMe(1, 2, 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement