Signature class that instropect python functor based on the code

class core.signature.Signature(f)[source]

Bases: object

Object to represent the signature of a function/method.

Parameters:f -- a function object containing __name__ variable
get_all_parameters(eludeSelf=True)[source]
static get_callable_arguments(function)[source]

Static method that returns 5 values for one entry object which can be any callable. The returned 5-uple is as follows: 0 - list-of-simple-arguments. Can be an empty list. 1 - list-of-(argname,argvalue)-arguments-with-defaults. Can be an empty list. 2 - name-of-vararg-argument. Can be None. 3 - name-of-keyword-argument. Can be None. 5 - boolean : True if function is a method, False otherwise... For Python defined callables, uses the "inspect" module. For builtins, tries some regexp parsing of the docstring.

get_doc()[source]
get_keywords()[source]
get_name()[source]
get_parameters(eludeSelf=True)[source]
get_returns()[source]

Return the outputs of a functor based on a predifened contract. TO BE DEFINED TODO

get_varargs()[source]
static regexp_args(function)[source]

Previous topic

<no title>

Next topic

<no title>

This Page