def addCallback(self, onetime, method, *args, **kwargs):
        """
        Add callback.

        The arguments passed are used as callback specific arguments.

        @param onetime: If C{True}, this callback is called at most once.
        @type onetime: C{bool}
        @param method: The callback callable to be added.
        @param args: Positional arguments to the callable.
        @type args: C{list}
        @param kwargs: Keyword arguments to the callable.
        @type kwargs: C{dict}
        """

        if not method in self.callbacks:
            self.callbacks[method] = (_MethodWrapper(method, *args, **kwargs),
                                      onetime)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/xish/utility.py/CallbackList.addCallback/original