bpo-19670: Added SimpleCookie.value_encode/value_decode docs#21017
Open
idomic wants to merge 6 commits into
Open
bpo-19670: Added SimpleCookie.value_encode/value_decode docs#21017idomic wants to merge 6 commits into
idomic wants to merge 6 commits into
Conversation
eamanu
reviewed
Jun 21, 2020
| """ | ||
| def value_decode(self, val): | ||
| """ | ||
| Return an unquoted string, from the cookie header in a reversed fasion of value_encode. |
Contributor
There was a problem hiding this comment.
To be consistent with other method documentation, could
you start write the docstring on the first line, please?
Contributor
Author
There was a problem hiding this comment.
Done for both, thanks!
|
|
||
| def value_encode(self, val): | ||
| """ | ||
| Return an escaped quoted string, if needed, for the cookie header usage. |
aisk
reviewed
Dec 30, 2025
| received from HTTP are kept as strings. | ||
| """ | ||
| def value_decode(self, val): | ||
| """Return an unquoted string, from the cookie header in a reversed fasion of value_encode. |
Member
There was a problem hiding this comment.
There is a typo:
Suggested change
| """Return an unquoted string, from the cookie header in a reversed fasion of value_encode. | |
| """Return an unquoted string, from the cookie header in a reversed fashion of value_encode. |
And this line width is larger than 80, we should break it.
aisk
reviewed
Dec 30, 2025
| @@ -0,0 +1 @@ | |||
| added documentation to `SimpleCookie.value_decode` and `SimpleCookie.value_encode` No newline at end of file | |||
Member
There was a problem hiding this comment.
According to the Dev Guide https://devguide.python.org/contrib/core-team/committing/#changes-that-require-news-entries, docs changes don't requires a news entry file.
|
This PR is stale because it has been open for 30 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SimpleCookie Generates Non-RFC6265-Compliant Cookies
https://bugs.python.org/issue19670