CADETProcess.plotting.SecondaryAxis.transform#
- SecondaryAxis.transform#
Parameter descriptor constrained to callable objects.
Designed to ensure a given parameter is callable. This is distinct from using a type constraint since built-in functions (e.g., those implemented in C) won’t be captured by types.FunctionTypes.
See also
Parameter
Typed
Examples
Here’s how you might use the Callable class:
>>> class MyModel: ... func = Callable() ... >>> model = MyModel() >>> model.func = print # This is fine as print is callable >>> model.func = "not_callable" # This will raise a TypeError