summaryrefslogtreecommitdiff
path: root/pyserial/serial/serialutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyserial/serial/serialutil.py')
-rw-r--r--pyserial/serial/serialutil.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pyserial/serial/serialutil.py b/pyserial/serial/serialutil.py
index c48ad7c..2a3253c 100644
--- a/pyserial/serial/serialutil.py
+++ b/pyserial/serial/serialutil.py
@@ -25,6 +25,11 @@ except (NameError, AttributeError):
list.append(self, item)
else:
list.append(self, chr(item))
+ # +=
+ def __iadd__(self, other):
+ for byte in other:
+ self.append(byte)
+ return self
# all Python versions prior 3.x convert str([17]) to '[17]' instead of '\x11'
# so a simple bytes(sequence) doesn't work for all versions