@@ -441,6 +441,43 @@ def lrange(self, key: str, start: int, stop: int) -> None:
441441 """
442442 raise NotImplementedError ()
443443
444+ def lset (self , key : str , index : int , value : str ) -> None :
445+ """
446+ Sets the value of a list element at the given index. The index can be
447+ negative to index from the back. The function will raise if the index
448+ is out of bounds.
449+
450+ See also the redis documentation: https://redis.io/commands/lset/
451+
452+ The pipeline value is None.
453+
454+ Args:
455+ key (str): The key.
456+
457+ index (int): The index. Can be negative to index from the back.
458+
459+ value (str): The value.
460+ """
461+ raise NotImplementedError ()
462+
463+ def lindex (self , key : str , index : int ) -> None :
464+ """
465+ Retrieves the value of a list element at the given index. The index can
466+ be negative to index from the back. None is returned for an out of
467+ bounds index.
468+
469+ See also the redis documentation: https://redis.io/commands/lindex/
470+
471+ The pipeline value is the value at the index or None if the index was
472+ out of bounds.
473+
474+ Args:
475+ key (str): The key.
476+
477+ index (int): The index. Can be negative to index from the back.
478+ """
479+ raise NotImplementedError ()
480+
444481 def llen (self , key : str ) -> None :
445482 """
446483 Computes the length of the list associated with the key.
@@ -1212,6 +1249,42 @@ def lrange(self, key: str, start: int, stop: int) -> list[str]:
12121249 """
12131250 raise NotImplementedError ()
12141251
1252+ def lset (self , key : str , index : int , value : str ) -> None :
1253+ """
1254+ Sets the value of a list element at the given index. The index can be
1255+ negative to index from the back. The function will raise if the index
1256+ is out of bounds.
1257+
1258+ See also the redis documentation: https://redis.io/commands/lset/
1259+
1260+ Args:
1261+ key (str): The key.
1262+
1263+ index (int): The index. Can be negative to index from the back.
1264+
1265+ value (str): The value.
1266+ """
1267+ raise NotImplementedError ()
1268+
1269+ def lindex (self , key : str , index : int ) -> str | None :
1270+ """
1271+ Retrieves the value of a list element at the given index. The index can
1272+ be negative to index from the back. None is returned for an out of
1273+ bounds index.
1274+
1275+ See also the redis documentation: https://redis.io/commands/lindex/
1276+
1277+ Args:
1278+ key (str): The key.
1279+
1280+ index (int): The index. Can be negative to index from the back.
1281+
1282+ Returns:
1283+ str | None: The value at the index or None if the index was out of
1284+ bounds.
1285+ """
1286+ raise NotImplementedError ()
1287+
12151288 def llen (self , key : str ) -> int :
12161289 """
12171290 Computes the length of the list associated with the key.
0 commit comments