concepts.dsl.dsl_functions#
Data structures representing functions in a DSL.
Most importantly, this file contains the following classes:
FunctionType
: the underlying type of a function, including argument types and return types.Function
: the function object, which is a callable object that can be used in expressions. They have names and types.
This file also implements a data structure for overloaded functions: OverloadedFunctionType
.
Internally, it contains a list of FunctionType
objects, and it is used to represent overloaded functions.
There are a few argument resolution methods implemented for both FunctionType
and OverloadedFunctionType
.
Module attributes
Get the current option context. |
|
A placeholder indicating that the argument is not specified. |
|
Acceptable types for function arguments. |
|
Acceptable types for function argument lists. |
|
Acceptable types for function return types. |
Classes
A generator for anonymous function arguments. |
|
A function object holds a function type and an optional overridden __call__. |
|
A context manager for controlling the function argument resolution. |
|
A data structure that holds multiple derived expressions for a function. |
|
A data structure that holds multiple overridden __call__ implementations for a function. |
|
FunctionResolvedFromRecord(function: Callable, ftype_index: Union[int, Tuple[int, ...]]) |
|
FunctionType defines the signature of a function. |
|
The data structure for storing the result of resolving an overloaded function. |
|
Exceptions
Exception raised when the function argument resolution fails. |