Class PyMethodDescr

    • Constructor Detail

      • PyMethodDescr

        public PyMethodDescr​(java.lang.String name,
                             java.lang.Class c,
                             int minargs,
                             int maxargs,
                             PyBuiltinFunction func)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class PyObject
      • __call__

        public PyObject __call__​(PyObject[] args)
        Description copied from class: PyObject
        A variant of the __call__ method when no keywords are passed. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.
        Overrides:
        __call__ in class PyObject
        Parameters:
        args - all arguments to the function.
      • __call__

        public PyObject __call__​(PyObject[] args,
                                 java.lang.String[] kwargs)
        Description copied from class: PyObject
        The basic method to override when implementing a callable object. The first len(args)-len(keywords) members of args[] are plain arguments. The last len(keywords) arguments are the values of the keyword arguments.
        Overrides:
        __call__ in class PyObject
        Parameters:
        args - all arguments to the function (including keyword arguments).
        kwargs - the keywords used for all keyword arguments.