Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docstring
  • Loading branch information
methane committed Apr 3, 2022
commit ff8eb2796c69b1ad726c177a3a7235db81753745
6 changes: 3 additions & 3 deletions Lib/_pyio.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def text_encoding(encoding, stacklevel=2):
"""
A helper function to choose the text encoding.

When encoding is not None, just return it.
Otherwise, return the default text encoding (i.e. "locale", or "utf-8"
if UTF-8 mode is enabled).
When encoding is not None, this function returns it.
Otherwise, this function returns the default text encoding
(i.e. "locale" or "utf-8" depends on UTF-8 mode).

This function emits an EncodingWarning if *encoding* is None and
sys.flags.warn_default_encoding is true.
Expand Down
6 changes: 3 additions & 3 deletions Modules/_io/_iomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,9 @@ _io.text_encoding

A helper function to choose the text encoding.

When encoding is not None, just return it.
Otherwise, return the default text encoding (i.e. "locale", or "utf-8"
if UTF-8 mode is enabled).
When encoding is not None, this function returns it.
Otherwise, this function returns the default text encoding
(i.e. "locale" or "utf-8" depends on UTF-8 mode).

This function emits an EncodingWarning if encoding is None and
sys.flags.warn_default_encoding is true.
Expand Down