def register_mimetype_handler(handler):
 if (not issubclass(handler, MimetypeHandler)):
  raise TypeError(u'Only MimetypeHandler subclasses can be registered')
 _registered_mimetype_handlers.append(handler)

def register_mimetype_handler ( handler ) : if ( not issubclass ( handler , MimetypeHandler ) ) : raise TypeError ( u'Only MimetypeHandler subclasses can be registered' ) _registered_mimetype_handlers . append ( handler )
register a mimetypehandler class .