summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-09-20 22:05:28 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-09-20 22:05:28 (GMT)
commit8a97896a765e4b1ef8753b4a410a8f3e981cb9b8 (patch)
treef21bd8d39436e5bb9b8d8937511fbcaab2ddcff6 /Doc/library
parent97dfad7856df5d9c681fa74d576a23247cc55a33 (diff)
downloadcpython-8a97896a765e4b1ef8753b4a410a8f3e981cb9b8.zip
cpython-8a97896a765e4b1ef8753b4a410a8f3e981cb9b8.tar.gz
cpython-8a97896a765e4b1ef8753b4a410a8f3e981cb9b8.tar.bz2
#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.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/email.contentmanager.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/email.contentmanager.rst b/Doc/library/email.contentmanager.rst
index 8f0bfdb..8f33a14 100644
--- a/Doc/library/email.contentmanager.rst
+++ b/Doc/library/email.contentmanager.rst
@@ -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'))