def _check_frozen(method, indent=u''):
 def wrapped(self, *args, **kwargs):
  if self._frozen:
   raise ValueError(_FROZEN_ERROR)
  else:
   return method(self, *args, **kwargs)
 wrapped.__name__ = method.__name__
 wrapped.__doc__ = ((method.__doc__ or u'') + (_FROZEN_NOTICE % indent))
 return wrapped

def _check_frozen ( method , indent = u'' ) : def wrapped ( self , * args , ** kwargs ) : if self . _frozen : raise ValueError ( _FROZEN_ERROR ) else : return method ( self , * args , ** kwargs ) wrapped . __name__ = method . __name__ wrapped . __doc__ = ( ( method . __doc__ or u'' ) + ( _FROZEN_NOTICE % indent ) ) return wrapped
given a method function .