Skip to content

Re-phrase docs of set_content behavior for str payloads#2

Merged
ZeroIntensity merged 1 commit into
ZeroIntensity:patch-1from
rapidcow:patch-1
Jul 24, 2024
Merged

Re-phrase docs of set_content behavior for str payloads#2
ZeroIntensity merged 1 commit into
ZeroIntensity:patch-1from
rapidcow:patch-1

Conversation

@rapidcow

@rapidcow rapidcow commented Jul 18, 2024

Copy link
Copy Markdown

Patch for gh-121543


📚 Documentation preview 📚: https://cpython-previews--2.org.readthedocs.build/

The previous patch only illustrates this behavior with a
very specific edge case, which IMO did not do a good job
elucidating the present ambiguous documentation, if not
worsening it by obscuring the true intention behind EOL
canonicalization for messages of text/* types.

This instead should address the more general case, abeit less
concrete, which seems like a fair compromise, considering
users who care about accurate representation of line endings
will likely carefully study the documentation and be assured
that this is an expected deviation from the legacy API, while
those who do not are not befuddled by a footnote that seems
to warn of something out of the blue.  I do not know if this
is true to the original author's intention, but it is my
personal understanding of this implementation at least. :/

The case of bytes is also addressed briefly in a subsequent
bullet point to assure the user that it is to be expected that
all bytes are preserved as any arbitrary binary file ought to
be.  I wish I could state this more explicitly, but that seems
rather hard without presumably restructuring this particular
page, so I will leave it to the original author... :)

Signed-off-by: Yizheng Meng <dev@rapidcow.org>
@ZeroIntensity ZeroIntensity merged commit 25046ae into ZeroIntensity:patch-1 Jul 24, 2024
@rapidcow rapidcow deleted the patch-1 branch July 29, 2024 12:09
ZeroIntensity pushed a commit that referenced this pull request Dec 8, 2025
Highlight lazy imports in the new REPL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants