#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:
R David Murray 2014-09-20 18:05:28 -04:00
parent 97dfad7856
commit 8a97896a76
4 changed files with 43 additions and 10 deletions

View file

@ -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'))