socek

Untitled

Nov 6th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. class MegaFunction(type):
  2.     def __call__(cls, *args, **kwargs):
  3.         return super(MegaFunction, cls).__call__(*args, **kwargs)()
  4.  
  5. class Elo(object):
  6.     __metaclass__ = MegaFunction
  7.  
  8.     def __init__(self, arg1):
  9.         self.arg1 = arg1
  10.  
  11.     def __call__(self):
  12.         return self.arg1
  13.  
  14. print Elo, Elo('1')
Advertisement
Add Comment
Please, Sign In to add comment