param.parameterized.Parameters.method_dependencies#
- Parameters.method_dependencies(name: str, intermediate: bool = False) list[PInfo][source]#
Retrieve the parameter dependencies of a specified method.
By default intermediate dependencies on sub-objects are not returned as these are primarily useful for internal use to determine when a sub-object dependency has to be updated.
- Parameters:
- Returns:
A list of
PInfoobjects representing the dependencies of the specified method. EachPInfoobject contains information about the instance, parameter, and the type of dependency.- Return type:
Examples
>>> import param >>> class MyClass(param.Parameterized): ... a = param.Parameter() ... b = param.Parameter() ... ... @param.depends('a', 'b', watch=True) ... def test(self): ... pass
Create an instance and inspect method dependencies:
>>> instance = MyClass() >>> instance.param.method_dependencies('test') [PInfo(inst=MyClass(a=None, b=None, name='MyClass...]