summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/email.message.rst9
-rw-r--r--Doc/whatsnew/3.5.rst8
2 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index aeea942..b91f26d 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -578,6 +578,15 @@ Here are the methods of the :class:`Message` class:
will be *failobj*.
+ .. method:: get_content_disposition()
+
+ Return the lowercased value (without parameters) of the message's
+ :mailheader:`Content-Disposition` header if it has one, or ``None``. The
+ possible values for this method are *inline*, *attachment* or ``None``
+ if the message follows :rfc:`2183`.
+
+ .. versionadded:: 3.5
+
.. method:: walk()
The :meth:`walk` method is an all-purpose generator which can be used to
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index 4b36315..0360de4 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -348,6 +348,14 @@ doctest
*module* contains no docstrings instead of raising :exc:`ValueError`.
(Contributed by Glenn Jones in :issue:`15916`.)
+email
+-----
+
+* A new method :meth:`~email.message.Message.get_content_disposition` provides
+ easy access to a canonical value for the :mailheader:`Content-Disposition`
+ header (``None`` if there is no such header). (Contributed by Abhilash Raj
+ in :issue:`21083`.)
+
glob
----