I have an email that I'm reading with the Python email lib that I need to modify the attachments of. The email Message class has the "attach" method, but does not have anything like "detach". How can I remove an attachment from a multipart message? If possible, I want to do this without recreating the message from scratch.
Essentially I want to:

Load the email
Remove the mime attachments
Add a new attachment
The way I've figured out to do it is:

Set the payload to an empty list with set_payload
Create the payload, and attach to the message.
Python email lib - How to remove attachment from existing message?