Download lib/python3.11/email/mime/nonmultipart.py from michaelu0826/phantom_env: direct link, hf CLI and curl.
- Browser
- Download file 689 Bytes
-
https://huggingface.co/datasets/michaelu0826/phantom_env/resolve/main/lib/python3.11/email/mime/nonmultipart.py
- Command line
-
hf download hf://datasets/michaelu0826/phantom_env/lib/python3.11/email/mime/nonmultipart.py
-
curl -L -o nonmultipart.py https://huggingface.co/datasets/michaelu0826/phantom_env/resolve/main/lib/python3.11/email/mime/nonmultipart.py
689 Bytes
| # Copyright (C) 2002-2006 Python Software Foundation | |
| # Author: Barry Warsaw | |
| # Contact: email-sig@python.org | |
| """Base class for MIME type messages that are not multipart.""" | |
| __all__ = ['MIMENonMultipart'] | |
| from email import errors | |
| from email.mime.base import MIMEBase | |
| class MIMENonMultipart(MIMEBase): | |
| """Base class for MIME non-multipart type messages.""" | |
| def attach(self, payload): | |
| # The public API prohibits attaching multiple subparts to MIMEBase | |
| # derived subtypes since none of them are, by definition, of content | |
| # type multipart/* | |
| raise errors.MultipartConversionError( | |
| 'Cannot attach additional subparts to non-multipart/*') | |