@@ -19,9 +19,7 @@ class TextHandler(str):
|
|||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
||||||
def __new__(cls, string):
|
def __new__(cls, string):
|
||||||
if isinstance(string, str):
|
return super().__new__(cls, str(string))
|
||||||
return super().__new__(cls, string)
|
|
||||||
return super().__new__(cls, '')
|
|
||||||
|
|
||||||
def __getitem__(self, key: Union[SupportsIndex, slice]) -> "TextHandler":
|
def __getitem__(self, key: Union[SupportsIndex, slice]) -> "TextHandler":
|
||||||
lst = super().__getitem__(key)
|
lst = super().__getitem__(key)
|
||||||
|
|||||||
Reference in New Issue
Block a user