Closed
Description
I'm a bit confused as to why http.cookies.SimpleCookie
is declared as a generic class and not like below?
class SimpleCookie(BaseCookie[str]):
...
The documentation on SimpleCookie
only talks about strings:
class http.cookies.SimpleCookie([input])¶
This class derives from BaseCookie and overrides value_decode() and value_encode(). SimpleCookie supports strings as cookie values. When setting the value, SimpleCookie calls the builtin str() to convert the value to a string. Values received from HTTP are kept as strings.
And from what I'm seeing, implementations value_decode
and value_encode
for SimpleCookie
only produces strings (but perhaps I'm missing something)?
Metadata
Metadata
Assignees
Labels
No labels