mimebase.py
来自「mallet是自然语言处理、机器学习领域的一个开源项目。」· Python 代码 · 共 25 行
PY
25 行
# Copyright (C) 2001,2002 Python Software Foundation# Author: barry@zope.com (Barry Warsaw)"""Base class for MIME specializations."""from email import Messageclass MIMEBase(Message.Message): """Base class for MIME specializations.""" def __init__(self, _maintype, _subtype, **_params): """This constructor adds a Content-Type: and a MIME-Version: header. The Content-Type: header is taken from the _maintype and _subtype arguments. Additional parameters for this header are taken from the keyword arguments. """ Message.Message.__init__(self) ctype = '%s/%s' % (_maintype, _subtype) self.add_header('Content-Type', ctype, **_params) self['MIME-Version'] = '1.0'
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?