Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/qcodes/instrument/instrument_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,14 @@ def _is_abstract(self) -> bool:
category=QCoDeSDeprecationWarning,
)
def __getitem__(self, key: str) -> Callable[..., Any] | Parameter:
"""Delegate instrument['name'] to parameter or function 'name'."""
"""
Delegate instrument['name'] to parameter or function 'name'.

Note:
This is deprecated. Use attributes directly or if dynamic attribute required look up via
.parameters or .functions dictionaries

"""
try:
return self.parameters[key]
except KeyError:
Expand All @@ -692,6 +699,10 @@ def set(self, param_name: str, value: Any) -> None:
param_name: The name of a parameter of this instrument.
value: The new value to set.


Note:
This is deprecated. Call set directly on the parameter.

"""
self.parameters[param_name].set(value)

Expand All @@ -709,6 +720,9 @@ def get(self, param_name: str) -> Any:
Returns:
The current value of the parameter.

Note:
This is deprecated. Call get directly on the parameter.

"""
return self.parameters[param_name].get()

Expand All @@ -727,6 +741,9 @@ def call(self, func_name: str, *args: Any) -> Any:
Returns:
The return value of the function.

Note:
This is deprecated. Call the function directly.

"""
return self.functions[func_name].call(*args)

Expand Down