[3.13] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335) (GH-130511)

* Clarify sys.getdefaultencoding() documentation

* Add missing documentation for PyUnicode_GetDefaultEncoding,
  the C equivalent of sys.getdefaultencoding
(cherry picked from commit 9f25c1f012)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
This commit is contained in:
Miss Islington (bot) 2025-02-24 17:10:17 +01:00 committed by GitHub
parent d71b167c5c
commit 3161f01760
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View file

@ -764,8 +764,8 @@ always available. Unless explicitly noted otherwise, all variables are read-only
.. function:: getdefaultencoding()
Return the name of the current default string encoding used by the Unicode
implementation.
Return ``'utf-8'``. This is the name of the default string encoding, used
in methods like :meth:`str.encode`.
.. function:: getdlopenflags()