(self, func: UserListener, ignoreArgs: Sequence[str] = ())
:param func: the callable for which to get paramaters info
        :param ignoreArgs: do not include the given names in the get*Args() return values

        After construction,
        - self.acceptsAllKwargs = True if the listener has a **kwargs arg
        - self.autoTopicArgName will be the name of argument in which to put the Topic
          object for which pubsub message is sent, or None if auto off. This is identified
          by a parameter that has a default value of AUTO_TOPIC.

        For instance,
        - listener(self, arg1, arg2=AUTO_TOPIC, arg3=None) will have self.allParams = (arg1, arg2, arg3),
            self.numRequired=1, and self.autoTopicArgName = 'arg2', whereas
        - listener(self, arg1, arg3=None) will have self.allParams = (arg1, arg3), self.numRequired=1, and
            self.autoTopicArgName = None.
:param func: the callable for which to get paramaters info
        :param ignoreArgs: do not include the given names in the get*Args() return values
: param func : the callable for which to get paramaters info : param ignoreArgs : do not include the given names in the get * Args () return values
def __init__(self, func: UserListener, ignoreArgs: Sequence[str] = ()):
        """
        :param func: the callable for which to get paramaters info
        :param ignoreArgs: do not include the given names in the get*Args() return values

        After construction,
        - self.acceptsAllKwargs = True if the listener has a **kwargs arg
        - self.autoTopicArgName will be the name of argument in which to put the Topic
          object for which pubsub message is sent, or None if auto off. This is identified
          by a parameter that has a default value of AUTO_TOPIC.

        For instance,
        - listener(self, arg1, arg2=AUTO_TOPIC, arg3=None) will have self.allParams = (arg1, arg2, arg3),
            self.numRequired=1, and self.autoTopicArgName = 'arg2', whereas
        - listener(self, arg1, arg3=None) will have self.allParams = (arg1, arg3), self.numRequired=1, and
            self.autoTopicArgName = None.
        """

        requiredArgs = []
        optionalArgs = []
        self.autoTopicArgName = None
        self.acceptsAllKwargs = False
        for argName, param in signature(func).parameters.items():
            if argName in ignoreArgs or param.kind == Parameter.VAR_POSITIONAL:
                continue

            if param.kind == Parameter.VAR_KEYWORD:
                self.acceptsAllKwargs = True
                continue

            if param.default == Parameter.empty:
                requiredArgs.append(argName)
            else:
                if param.default == AUTO_TOPIC:
                    self.autoTopicArgName = argName
                else:
                    optionalArgs.append(argName)

        self.requiredArgs = tuple(requiredArgs)
        self.optionalArgs = tuple(optionalArgs)
        self.allParams = self.requiredArgs + self.optionalArgs
def __init__ ( self , func : UserListener , ignoreArgs : Sequence [ str ] = ( ) ) : requiredArgs = [ ] optionalArgs = [ ] self . autoTopicArgName = None self . acceptsAllKwargs = False for argName , param in signature ( func ) . parameters . items ( ) : if argName in ignoreArgs or param . kind == Parameter . VAR_POSITIONAL : continue if param . kind == Parameter . VAR_KEYWORD : self . acceptsAllKwargs = True continue if param . default == Parameter . empty : requiredArgs . append ( argName ) else : if param . default == AUTO_TOPIC : self . autoTopicArgName = argName else : optionalArgs . append ( argName ) self . requiredArgs = tuple ( requiredArgs ) self . optionalArgs = tuple ( optionalArgs ) self . allParams = self . requiredArgs + self . optionalArgs