def __add__(self, other):
if type(other) == list:
return ClemencyBuffer(self._buf + other)
elif type(other) == str:
assert all(c in printable for c in other)
return self + ClemencyBuffer.from_string(other)
elif type(other) == type(self):
return ClemencyBuffer(self._buf + other._buf)
else:
assert False
评论列表
文章目录