def _unabc(cls, msg="{} isn't implemented"):
 def make_dummy_method(ab_name):
  'A function to make the dummy method, to close over ab_name.'
  def dummy_method(self, *args, **kwargs):
   'The method provided for all missing abstract methods.'
   raise NotImplementedError(msg.format(ab_name))
  return dummy_method
 for ab_name in cls.__abstractmethods__:
  setattr(cls, ab_name, make_dummy_method(ab_name))
 cls.__abstractmethods__ = ()
 return cls

def _unabc ( cls , msg = "{} isn't implemented" ) : def make_dummy_method ( ab_name ) : def dummy_method ( self , * args , ** kwargs ) : raise NotImplementedError ( msg . format ( ab_name ) ) return dummy_method for ab_name in cls . __abstractmethods__ : setattr ( cls , ab_name , make_dummy_method ( ab_name ) ) cls . __abstractmethods__ = ( ) return cls
helper method to implement unabc .