module documentation

Undocumented

Class MethodicalInput An input for a MethodicalMachine.
Class MethodicalOutput An output for a MethodicalMachine.
Class MethodicalState A state for a MethodicalMachine.
Class MethodicalTracer Undocumented
Function assertNoCode Undocumented
Function gensym Create a unique Python identifier.
Function wrapTracer Undocumented
Type Variable R Undocumented
Type Variable T Undocumented
Type Alias StringOutputTracer Undocumented
Type Alias StringTracer Undocumented
Variable ArgSpec Undocumented
Variable counter Undocumented
Function _docstring docstring
Function _empty Undocumented
Function _filterArgs Filter out arguments that were passed to input that output won't accept.
Function _getArgNames Get the name of all arguments defined in a function signature.
Function _getArgSpec Normalize inspect.ArgSpec across python versions and convert mutable attributes to immutable types.
Function _keywords_only Decorate a function so all its arguments must be passed by keyword.
Function _transitionerFromInstance Get a Transitioner
def assertNoCode(f: Callable[..., Any]): (source)

Undocumented

def gensym(): (source)

Create a unique Python identifier.

Undocumented

Undocumented

Value
TypeVar('R')

Undocumented

Value
TypeVar('T')
StringOutputTracer = (source)

Undocumented

Value
Callable[[str], None]
StringTracer: TypeAlias = (source)

Undocumented

Value
Callable[[str, str, str], StringOutputTracer | None]

Undocumented

Undocumented

def _docstring(): (source)

docstring

def _empty(): (source)

Undocumented

def _filterArgs(args, kwargs, inputSpec, outputSpec): (source)

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]

def _getArgNames(spec): (source)

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]

def _getArgSpec(func): (source)

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

def _keywords_only(f): (source)

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.