Dispatchable¶
-
class
uarray.
Dispatchable
(value, dispatch_type, coercible=True)[source]¶ A utility class which marks an argument with a specific dispatch type.
-
value
¶ The value of the Dispatchable.
-
type
¶ The type of the Dispatchable.
Examples
>>> x = Dispatchable(1, str) >>> x <Dispatchable: type=<class 'str'>, value=1>
See also
all_of_type
Marks all unmarked parameters of a function.
mark_as
Allows one to create a utility function to mark as a given type.
Methods
Dispatchable.__init__
(value, dispatch_type)Initialize self.
-