]> granicus.if.org Git - python/commitdiff
#2211: Fix typo, address missed review comment.
authorR David Murray <rdmurray@bitdance.com>
Mon, 30 Mar 2015 15:48:50 +0000 (11:48 -0400)
committerR David Murray <rdmurray@bitdance.com>
Mon, 30 Mar 2015 15:48:50 +0000 (11:48 -0400)
Doc/library/http.cookies.rst
Doc/whatsnew/3.5.rst

index 5c3fbc8df1ade442e6b06aa6fffb5d356f783faa..7c85d0954df1b4399e7fbcebc29420656a9f32be 100644 (file)
@@ -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
index d795a1130407d996d84071084171832f3260eec5..d33dfe8e70264717dd8d465e82974bd08808abeb 100644 (file)
@@ -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`)