|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.python.core.PyObject
org.python.core.PyFunction
public class PyFunction
A Python function.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.python.core.PyObject |
|---|
PyObject.ConversionException |
| Field Summary | |
|---|---|
PyObject |
__dict__
A function's lazily created __dict__; allows arbitrary attributes to be tacked on. |
PyObject |
__doc__
The writable doc string, also available via func_doc. |
PyObject |
__module__
Writable object describing what module this function belongs to. |
java.lang.String |
__name__
The writable name, also available via func_name. |
PyObject |
func_closure
A read only closure tuple for nested scopes. |
PyCode |
func_code
The actual funtion's code, writable. |
PyObject[] |
func_defaults
Default argument values for associated kwargs. |
PyObject |
func_globals
The read only namespace; a dict (PyStringMap). |
static PyType |
TYPE
|
| Constructor Summary | |
|---|---|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code)
|
|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject doc)
|
|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject[] closure_cells)
|
|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject doc,
PyObject[] closure_cells)
|
|
| Method Summary | |
|---|---|
PyObject |
__call__()
A variant of the __call__ method with no arguments. |
PyObject |
__call__(PyObject arg)
A variant of the __call__ method with one argument. |
PyObject |
__call__(PyObject[] args,
java.lang.String[] keywords)
The basic method to override when implementing a callable object. |
PyObject |
__call__(PyObject arg1,
PyObject arg2)
A variant of the __call__ method with two arguments. |
PyObject |
__call__(PyObject arg1,
PyObject[] args,
java.lang.String[] keywords)
A variant of the __call__ method with one extra initial argument. |
PyObject |
__call__(PyObject arg1,
PyObject arg2,
PyObject arg3)
A variant of the __call__ method with three arguments. |
PyObject |
__get__(PyObject obj,
PyObject type)
Get descriptor for this PyObject. |
void |
__setattr__(java.lang.String name,
PyObject value)
A variant of the __setattr__ method which accepts a String as the key. |
void |
delDict()
|
void |
delDoc()
|
void |
delFuncDefaults()
|
void |
delFuncDict()
|
void |
delFuncDoc()
|
void |
delModule()
|
PyObject |
fastGetDict()
xxx implements where meaningful |
PyObject |
getDict()
xxx implements where meaningful |
PyObject |
getDoc()
|
PyObject |
getFuncDefaults()
|
PyObject |
getFuncDict()
|
PyObject |
getFuncDoc()
|
PyString |
getFuncName()
|
boolean |
isMappingType()
|
boolean |
isNumberType()
|
boolean |
isSequenceType()
|
void |
setDict(PyObject value)
|
void |
setFuncClosure(PyObject value)
|
void |
setFuncCode(PyCode code)
|
void |
setFuncDefaults(PyObject func_defaults)
|
void |
setFuncDict(PyObject value)
|
void |
setFuncDoc(PyObject func_doc)
|
void |
setFuncGlobals(PyObject value)
|
void |
setFuncName(PyString func_name)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PyType TYPE
public java.lang.String __name__
public PyObject __doc__
public PyObject func_globals
public PyObject[] func_defaults
public PyCode func_code
public PyObject __dict__
public PyObject func_closure
public PyObject __module__
| Constructor Detail |
|---|
public PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject doc,
PyObject[] closure_cells)
public PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject doc)
public PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code)
public PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject[] closure_cells)
| Method Detail |
|---|
public PyString getFuncName()
public void setFuncName(PyString func_name)
public PyObject getFuncDoc()
public void setFuncDoc(PyObject func_doc)
public void delFuncDoc()
public void delDoc()
public PyObject getFuncDefaults()
public void setFuncDefaults(PyObject func_defaults)
public void delFuncDefaults()
public void setFuncCode(PyCode code)
public void delModule()
public PyObject fastGetDict()
PyObject
fastGetDict in class PyObjectpublic PyObject getDict()
PyObject
getDict in class PyObjectpublic void setDict(PyObject value)
setDict in class PyObjectpublic void delDict()
delDict in class PyObjectpublic PyObject getFuncDict()
public void setFuncDict(PyObject value)
public void delFuncDict()
public void setFuncGlobals(PyObject value)
public void setFuncClosure(PyObject value)
public void __setattr__(java.lang.String name,
PyObject value)
PyObject
__setattr__ in class PyObjectname - the name whose value will be set -
must be an interned string .value - the value to set this name toPyObject.__setattr__(PyString, PyObject)public PyObject getDoc()
getDoc in class PyObject
public PyObject __get__(PyObject obj,
PyObject type)
PyObject
__get__ in class PyObjectobj - -
the instance accessing this descriptor. Can be null if this is
being accessed by a type.type - -
the type accessing this descriptor. Will be null if obj exists
as obj is of the type accessing the descriptor.
public PyObject __call__()
PyObject__call__(args, keywords) with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__ in class PyObjectpublic PyObject __call__(PyObject arg)
PyObject__call__(args, keywords) with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__ in class PyObjectarg - the single argument to the function.
public PyObject __call__(PyObject arg1,
PyObject arg2)
PyObject__call__(args, keywords) with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__ in class PyObjectarg1 - the first argument to the function.arg2 - the second argument to the function.
public PyObject __call__(PyObject arg1,
PyObject arg2,
PyObject arg3)
PyObject__call__(args, keywords) with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__ in class PyObjectarg1 - the first argument to the function.arg2 - the second argument to the function.arg3 - the third argument to the function.
public PyObject __call__(PyObject[] args,
java.lang.String[] keywords)
PyObject
__call__ in class PyObjectargs - all arguments to the function (including
keyword arguments).keywords - the keywords used for all keyword arguments.
public PyObject __call__(PyObject arg1,
PyObject[] args,
java.lang.String[] keywords)
PyObject__call__(args,
keywords) with the appropriate arguments. The only reason to
override this function would be for improved performance.
__call__ in class PyObjectarg1 - the first argument to the function.args - the last arguments to the function (including
keyword arguments).keywords - the keywords used for all keyword arguments.public java.lang.String toString()
toString in class PyObjectpublic boolean isMappingType()
isMappingType in class PyObjectpublic boolean isNumberType()
isNumberType in class PyObjectpublic boolean isSequenceType()
isSequenceType in class PyObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||