langtree.operators¶
Submodules¶
Package Contents¶
Classes¶
A class to represent and process custom call and parse operations. |
|
Functions¶
|
Decorator that makes a function chainable with its arguments. |
- class langtree.operators.Operator(call=default_call, parse=default_parse)[source]¶
Bases:
objectA class to represent and process custom call and parse operations.
- __call__(*args, **kwargs)[source]¶
Call the Operator’s call function and parse its result.
- Parameters:
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
The parsed result of the call function.
- langtree.operators.chainable(func)[source]¶
Decorator that makes a function chainable with its arguments.
- Parameters:
func (callable) – The function to make chainable.
- Returns:
The chainable function.
- Return type:
callable