From ba6ea9b237572f301e20416dceb3573538b89a1e Mon Sep 17 00:00:00 2001 From: R David Murray Date: Mon, 30 Mar 2015 11:48:50 -0400 Subject: [PATCH] #2211: Fix typo, address missed review comment. --- Doc/library/http.cookies.rst | 6 ++++++ Doc/whatsnew/3.5.rst | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst index 5c3fbc8df1..7c85d0954d 100644 --- a/Doc/library/http.cookies.rst +++ b/Doc/library/http.cookies.rst @@ -228,6 +228,12 @@ Morsel Objects return a Morsel object instead of a dict. +.. method:: Morsel.setdefault(key, value=None) + + Raise an error if key is not a valid :rfc:`2109` attribute, otherwise + behave the same as :meth:`dict.setdefault`. + + .. _cookie-example: Example diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index d795a11304..d33dfe8e70 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -679,8 +679,8 @@ Changes in the Python API consistent: morsel comparison now takes the :attr:`~http.cookies.Morsel.key` and :attr:`~http.cookies.Morsel.value` into account, :meth:`~http.cookies.Morsel.copy` now results in a - :class:`~http.cookies.Morsel` instance rather than a *dict*, and - :meth:`~http.cookies.Morsel.update` will no raise an exception if any of the + :class:`~http.cookies.Morsel` instance rather than a :class:`dict`, and + :meth:`~http.cookies.Morsel.update` will now raise an exception if any of the keys in the update dictionary are invalid. In addition, the undocumented *LegalChars* parameter of :func:`~http.cookies.Morsel.set` is deprecated and is now ignored. (:issue:`2211`) -- 2.50.0