Ejemplo n.º 1
0
 def __call__(self, *args, **kwargs):
     if self.cls and self.cls.__dict__.has_key(self.__name__):
         raise TypeError("Virtual method %s must be called from a subclass." % self.__name__)
     return method_decorator.__call__( self, *args, **kwargs )
     
Ejemplo n.º 2
0
 def expensive_code(): # no args here! closure only
     return method_decorator.__call__(self, *args, **kwargs)