.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.pubsub.core.callables .. highlight:: python .. _wx.lib.pubsub.core.callables.CallArgsInfo: ========================================================================================================================================== |phoenix_title| **wx.lib.pubsub.core.callables.CallArgsInfo** ========================================================================================================================================== Represent the "signature" or protocol of a listener in the context of topics. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class CallArgsInfo:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.__init__` Inputs :meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.getAllArgs` :meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.getOptionalArgs` :meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.getRequiredArgs` Return a tuple of names indicating which call arguments ================================================================================ ================================================================================ | |api| Class API =============== .. class:: CallArgsInfo Represent the "signature" or protocol of a listener in the context of topics. .. method:: __init__(self, func, firstArgIdx) Inputs: - Args and defaultVals are the complete set of arguments and default values as obtained form inspect.getargspec(); - The firstArgIdx points to the first item in args that is of use, so it is typically 0 if listener is a function, and 1 if listener is a method. - The acceptsAllKwargs should be true if the listener has **kwargs in its protocol. After construction, - self.allParams will contain the subset of 'args' without first firstArgIdx items, - self.numRequired will indicate number of required arguments (ie self.allParams[:self.numRequired] are the required args names); - self.acceptsAllKwargs = acceptsAllKwargs - self.autoTopicArgName will be the name of argument in which to put the topic object for which pubsub message is sent, or None. This is identified by the argument 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. .. method:: getAllArgs(self) .. method:: getOptionalArgs(self) .. method:: getRequiredArgs(self) Return a tuple of names indicating which call arguments are required to be present when pub.sendMessage(...) is called.