mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
#21091: make is_attachment a method.
Since EmailMessage is a provisional API we can fix API bugs in a maintenance release, but I used a trick suggested by Serhiy to maintain backward compatibility with 3.4.0/1.
This commit is contained in:
parent
97dfad7856
commit
8a97896a76
4 changed files with 43 additions and 10 deletions
|
|
@ -70,11 +70,15 @@ this module.
|
|||
the following methods:
|
||||
|
||||
|
||||
.. attribute:: is_attachment
|
||||
.. method:: is_attachment
|
||||
|
||||
Set to ``True`` if there is a :mailheader:`Content-Disposition` header
|
||||
Return ``True`` if there is a :mailheader:`Content-Disposition` header
|
||||
and its (case insensitive) value is ``attachment``, ``False`` otherwise.
|
||||
|
||||
.. versionchanged:: 3.4.2
|
||||
is_attachment is now a method instead of a property, for consistency
|
||||
with :meth:`~email.message.Message.is_multipart`.
|
||||
|
||||
|
||||
.. method:: get_body(preferencelist=('related', 'html', 'plain'))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue