From: peacetara Date: Thu, 17 May 2018 17:09:36 +0000 (-0700) Subject: add expires docs to set_cookie. X-Git-Tag: v5.1.0b1~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b43db1aede3b4851f7755aaca9569f7e05a5733;p=thirdparty%2Ftornado.git add expires docs to set_cookie. update set_cookie docstring to explain what expires will accept and behave properly, without having to go track down httputil.format_timestamp, which is not exposed in the docs(that I could find). --- diff --git a/tornado/web.py b/tornado/web.py index 4e307826d..3d6a3e198 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -542,6 +542,10 @@ class RequestHandler(object): Newly-set cookies are not immediately visible via `get_cookie`; they are not present until the next request. + + expires may be a numeric timestamp as returned by `time.time`, + a time tuple as returned by `time.gmtime`, or a + `datetime.datetime` object. Additional keyword arguments are set on the cookies.Morsel directly.