def msg_register(self, msgType, isFriendChat=False, isGroupChat=False, isMpChat=False):
 if (not isinstance(msgType, list)):
  msgType = [msgType]
 def _msg_register(fn):
  for _msgType in msgType:
   if isFriendChat:
    self.functionDict['FriendChat'][_msgType] = fn
   if isGroupChat:
    self.functionDict['GroupChat'][_msgType] = fn
   if isMpChat:
    self.functionDict['MpChat'][_msgType] = fn
   if (not any((isFriendChat, isGroupChat, isMpChat))):
    self.functionDict['FriendChat'][_msgType] = fn
 return _msg_register

def msg_register ( self , msgType , isFriendChat = False , isGroupChat = False , isMpChat = False ) : if ( not isinstance ( msgType , list ) ) : msgType = [ msgType ] def _msg_register ( fn ) : for _msgType in msgType : if isFriendChat : self . functionDict [ 'FriendChat' ] [ _msgType ] = fn if isGroupChat : self . functionDict [ 'GroupChat' ] [ _msgType ] = fn if isMpChat : self . functionDict [ 'MpChat' ] [ _msgType ] = fn if ( not any ( ( isFriendChat , isGroupChat , isMpChat ) ) ) : self . functionDict [ 'FriendChat' ] [ _msgType ] = fn return _msg_register
a decorator constructor return a specific decorator based on information given .