Undocumented
Class |
|
An input for a MethodicalMachine . |
Class |
|
An output for a MethodicalMachine . |
Class |
|
A state for a MethodicalMachine . |
Class |
|
Undocumented |
Function | assert |
Undocumented |
Function | gensym |
Create a unique Python identifier. |
Function | wrap |
Undocumented |
Type Variable | R |
Undocumented |
Type Variable | T |
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Variable |
|
Undocumented |
Variable | counter |
Undocumented |
Function | _docstring |
docstring |
Function | _empty |
Undocumented |
Function | _filter |
Filter out arguments that were passed to input that output won't accept. |
Function | _get |
Get the name of all arguments defined in a function signature. |
Function | _get |
Normalize inspect.ArgSpec across python versions and convert mutable attributes to immutable types. |
Function | _keywords |
Decorate a function so all its arguments must be passed by keyword. |
Function | _transitioner |
Get a Transitioner |
StringTracer | None
) -> Tracer[ MethodicalState, MethodicalInput, MethodicalOutput] | None
:
(source)
¶
Undocumented
Filter out arguments that were passed to input that output won't accept.
:param tuple args: The *args that input received. :param dict kwargs: The **kwargs that input received. :param ArgSpec inputSpec: The input's arg spec. :param ArgSpec outputSpec: The output's arg spec. :return: The args and kwargs that output will accept. :rtype: Tuple[tuple, dict]
Get the name of all arguments defined in a function signature.
The name of * and ** arguments is normalized to "*args" and "**kwargs".
:param ArgSpec spec: A function to interrogate for a signature. :return: The set of all argument names in `func`s signature. :rtype: Set[str]
Normalize inspect.ArgSpec across python versions and convert mutable attributes to immutable types.
:param Callable func: A function. :return: The function's ArgSpec. :rtype: ArgSpec
Decorate a function so all its arguments must be passed by keyword.
A useful utility for decorators that take arguments so that they don't accidentally get passed the thing they're decorating as their first argument.
Only works for methods right now.
object
, symbol: str
, automaton: Automaton[ MethodicalState, MethodicalInput, MethodicalOutput]
) -> Transitioner[ MethodicalState, MethodicalInput, MethodicalOutput]
:
(source)
¶
Get a Transitioner