Skip to content

Commit 7fde817

Browse files
authored
Update http.cookiejar.rst
1 parent 8bd67ca commit 7fde817

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Doc/library/http.cookiejar.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,16 @@ contained :class:`Cookie` objects.
252252

253253
Discard all expired cookies.
254254

255-
Discards all contained cookies that have a true :attr:`is_expired` attribute
255+
Discards all contained cookies that have a true :attr:`expires` attribute
256256
(usually because their expiration time have passed)
257257

258258
You probably don't need to call this method because expired cookies are never
259-
sent back to the server (provided you're using :class:`DefaultCookiePolicy`),
260-
this method is called by :class:`CookieJar` itself every so often, and the
261-
:meth:`save` method won't save expired cookies anyway (unless you ask
259+
sent back to the server (provided you're using :class:`DefaultCookiePolicy`).
260+
This method is called by :class:`CookieJar` itself every so often. It *could*
261+
only be useful when you are customizing a `CookiePolicy` with your own
262+
expiring logic.
263+
264+
Note that the :meth:`save` method won't save expired cookies anyway (unless you ask
262265
otherwise by passing a true *ignore_expires* argument).
263266

264267
:class:`FileCookieJar` implements the following additional methods:

0 commit comments

Comments
 (0)