perf(parser): A lot of optimizations to speed things up

This commit is contained in:
Karim shoair
2025-08-01 06:28:52 +03:00
parent f93348b915
commit 83a19f3b17
2 changed files with 29 additions and 38 deletions
-3
View File
@@ -31,9 +31,6 @@ class TextHandler(str):
__slots__ = ()
def __new__(cls, string):
return super().__new__(cls, str(string))
def __getitem__(self, key: SupportsIndex | slice) -> "TextHandler":
lst = super().__getitem__(key)
return cast(_TextHandlerType, TextHandler(lst))