com.ziclix.python.sql.util
Class PyArgParser
- java.lang.Object
-
- com.ziclix.python.sql.util.PyArgParser
-
public class PyArgParser extends java.lang.ObjectParse the args and kws for a method call.
-
-
Constructor Summary
Constructors Constructor and Description PyArgParser(PyObject[] args, java.lang.String[] kws)Construct a parser with the arguments and keywords.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PyObjectarg(int index)Return the argument at the given index, raise an IndexError if out of range.PyObjectarg(int index, PyObject def)Return the argument at the given index, or the default if the index is out of range.booleanhasKw(java.lang.String kw)Does the keyword exist?PyObjectkw(java.lang.String kw)Return the value for the keyword, raise a KeyError if the keyword does not exist.PyObjectkw(java.lang.String kw, PyObject def)Return the value for the keyword, return the default if the keyword does not exist.java.lang.String[]kws()Get the array of keywords.intnumArg()Get the number of arguments.intnumKw()How many keywords?
-
-
-
Constructor Detail
-
PyArgParser
public PyArgParser(PyObject[] args, java.lang.String[] kws)
Construct a parser with the arguments and keywords.
-
-
Method Detail
-
numKw
public int numKw()
How many keywords?
-
hasKw
public boolean hasKw(java.lang.String kw)
Does the keyword exist?
-
kw
public PyObject kw(java.lang.String kw)
Return the value for the keyword, raise a KeyError if the keyword does not exist.
-
kw
public PyObject kw(java.lang.String kw, PyObject def)
Return the value for the keyword, return the default if the keyword does not exist.
-
kws
public java.lang.String[] kws()
Get the array of keywords.
-
numArg
public int numArg()
Get the number of arguments.
-
arg
public PyObject arg(int index)
Return the argument at the given index, raise an IndexError if out of range.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG