mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 08:20:02 +02:00
adds dict.pop to pydase.Client
The pop method removes the element in the dictionary on the server, but it will not return anything. This is because pop will delete the element on the server, and returned proxy classes will not be meaningful.
This commit is contained in:
parent
3384d1bebf
commit
36e30970c5
@ -97,6 +97,14 @@ class ProxyDict(dict[str | float, Any]):
|
||||
|
||||
update_value(self._sio, self._loop, full_access_path, value)
|
||||
|
||||
def pop(self, key: str) -> Any:
|
||||
"""Removes the element from the dictionary on the server. It does not return
|
||||
any proxy as the corresponding object on the server does not live anymore."""
|
||||
|
||||
full_access_path = f"{self._parent_path}.pop"
|
||||
|
||||
trigger_method(self._sio, self._loop, full_access_path, [key], {})
|
||||
|
||||
|
||||
class ProxyList(list[Any]):
|
||||
def __init__(
|
||||
|
Loading…
x
Reference in New Issue
Block a user