diff options
Diffstat (limited to 'mu4web/main.py')
-rw-r--r-- | mu4web/main.py | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/mu4web/main.py b/mu4web/main.py index 3cc39dc..8a4baec 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -46,6 +46,7 @@ from .components import ( attachement_tree, login_page, ) +from .util import MutableString # # A few operations depend on the index of attachements. These index @@ -195,29 +196,6 @@ def raw_message(): return flask.send_file(filename, mimetype='message/rfc822') -class MutableString: - """ - A mutatable string. - - Strings are immutable by default in python. This works almost - exactly like a regular string, but ``+=`` actually changes the - object in place. - """ - - def __init__(self) -> None: - self.str = '' - - def __iadd__(self, other: str) -> 'MutableString': - self.str += other - return self - - def __repr__(self) -> str: - return f'MutableString("{self.str}")' - - def __str__(self) -> str: - return self.str - - class IMGParser(HTMLParser): """ Rewrites HTML image tags to be safer/have more functionality. |