Support __add__ and __radd_ on JankStringyBytes

This commit is contained in:
Salad Dais
2023-12-31 15:58:05 +00:00
parent 167673aa08
commit 1fc46e66bc

View File

@@ -317,6 +317,16 @@ class JankStringyBytes(bytes):
return item in str(self)
return item in bytes(self)
def __add__(self, other):
if isinstance(other, bytes):
return bytes(self) + other
return str(self) + other
def __radd__(self, other):
if isinstance(other, bytes):
return other + bytes(self)
return other + str(self)
def lower(self):
return str(self).lower()