Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
cattrs.dispatch.FunctionDispatch Class Reference
Collaboration diagram for cattrs.dispatch.FunctionDispatch:
Collaboration graph
[legend]

Public Member Functions

None register (self, Predicate predicate, Callable[..., Any] func, is_generator=False, takes_converter=False)
 
Callable[..., Any]|None dispatch (self, Any typ)
 
int get_num_fns (self)
 
None copy_to (self, FunctionDispatch other, int skip=0)
 

Protected Attributes

 _converter
 
 _handler_pairs
 

Static Protected Attributes

BaseConverter _converter
 
tuple _handler_pairs
 

Detailed Description

FunctionDispatch is similar to functools.singledispatch, but
instead dispatches based on functions that take the type of the
first argument in the method, and return True or False.

objects that help determine dispatch should be instantiated objects.

:param converter: A converter to be used for factories that require converters.

..  versionchanged:: 24.1.0
    Support for factories that require converters, hence this requires a
    converter when creating.

Member Function Documentation

◆ dispatch()

Callable[..., Any] | None cattrs.dispatch.FunctionDispatch.dispatch (   self,
Any  typ 
)
Return the appropriate handler for the object passed.

Member Data Documentation

◆ _handler_pairs

tuple cattrs.dispatch.FunctionDispatch._handler_pairs
staticprotected
Initial value:
= (
Factory(list)
)

The documentation for this class was generated from the following file: