From 5baa688fbc93233c8c2a6a12a8575a266eae6e0c Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 23 Feb 2019 21:39:46 +0000 Subject: [PATCH] Make IRCArgs mutable --- src/IRCLine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/IRCLine.py b/src/IRCLine.py index 64aa573e..91a7031b 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -17,8 +17,10 @@ class IRCArgs(object): return "IRCArgs(%s)" % self._args def __len__(self) -> int: return len(self._args) - def __getitem__(self, index) -> str: + def __getitem__(self, index: int) -> str: return self._args[index] + def __setitem__(self, index: int, value: str): + self._args[index] = value class Hostmask(object): def __init__(self, nickname: str, username: str, hostname: str,