Class PyMethod

java.lang.Object
org.python.core.PyObject
org.python.core.PyMethod
All Implemented Interfaces:
Serializable

public class PyMethod extends PyObject
A python method.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • __dir__

      public PyObject __dir__()
      Description copied from class: PyObject
      Equivalent to the standard Python __dir__ method.
      Overrides:
      __dir__ in class PyObject
      Returns:
      a list of names defined by this object.
    • __findattr__

      public PyObject __findattr__(String name)
      Description copied from class: PyObject
      A variant of the __findattr__ method which accepts a Java String as the name. Warning: name must be an interned string!
      Overrides:
      __findattr__ in class PyObject
      Parameters:
      name - the name to lookup in this namespace must be an interned string .
      Returns:
      the value corresponding to name or null if name is not found
      See Also:
    • __delattr__

      public void __delattr__(String name)
      Description copied from class: PyObject
      A variant of the __delattr__ method which accepts a String as the key. This String must be interned. By default, this will call __delattr__(PyString name) with the appropriate args. The only reason to override this method is for performance.
      Overrides:
      __delattr__ in class PyObject
      Parameters:
      name - the name which will be removed - must be an interned string .
      See Also:
    • _doget

      public PyObject _doget(PyObject container)
      Overrides:
      _doget in class PyObject
    • _doget

      public PyObject _doget(PyObject container, PyObject wherefound)
      Overrides:
      _doget in class PyObject
    • __call__

      public PyObject __call__(PyObject[] args, String[] keywords)
      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).
      keywords - the keywords used for all keyword arguments.
    • __cmp__

      public int __cmp__(PyObject other)
      Description copied from class: PyObject
      Equivalent to the standard Python __cmp__ method.
      Overrides:
      __cmp__ in class PyObject
      Parameters:
      other - the object to compare this with.
      Returns:
      -1 if this < 0; 0 if this == o; +1 if this > o; -2 if no comparison is implemented
    • safeRepr

      public String safeRepr() throws PyIgnoreMethodTag
      Overrides:
      safeRepr in class PyObject
      Throws:
      PyIgnoreMethodTag
    • toString

      public String toString()
      Overrides:
      toString in class PyObject