Class PyTableCode

All Implemented Interfaces:
Serializable

public class PyTableCode extends PyBaseCode
An implementation of PyCode where the actual executable content is stored as a PyFunctionTable instance and an integer index.
See Also:
  • Field Details

    • co_code

      public String co_code
  • Constructor Details

    • PyTableCode

      public PyTableCode(int argcount, String[] varnames, String filename, String name, int firstlineno, boolean varargs, boolean varkwargs, PyFunctionTable funcs, int func_id)
    • PyTableCode

      public PyTableCode(int argcount, String[] varnames, String filename, String name, int firstlineno, boolean varargs, boolean varkwargs, PyFunctionTable funcs, int func_id, String[] cellvars, String[] freevars, int npurecell, int moreflags)
  • 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.
    • __setattr__

      public void __setattr__(String name, PyObject value)
      Description copied from class: PyObject
      A variant of the __setattr__ method which accepts a String as the key. This String must be interned.
      Overrides:
      __setattr__ in class PyObject
      Parameters:
      name - the name whose value will be set - must be an interned string .
      value - the value to set this name to
      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:
    • __findattr_ex__

      public PyObject __findattr_ex__(String name)
      Description copied from class: PyObject
      Attribute lookup hook. If the attribute is not found, null may be returned or a Py.AttributeError can be thrown, whatever is more correct, efficient and/or convenient for the implementing class. Client code should use PyObject.__getattr__(String) or PyObject.__findattr__(String). Both methods have a clear policy for failed lookups.
      Overrides:
      __findattr_ex__ in class PyObject
      Returns:
      The looked up value. May return null if the attribute is not found
    • call

      public PyObject call(ThreadState ts, PyFrame frame, PyObject closure)
      Overrides:
      call in class PyBaseCode