Skip to content

Commit 761959f

Browse files
committed
Correct documentation about returned result.
1 parent 9aab9ae commit 761959f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Doc/library/gettext.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,10 @@ unexpected, or if other problems occur while reading the file, instantiating a
421421
.. method:: pgettext(context, message)
422422

423423
Look up the *context* and *message* id in the catalog and return the
424-
corresponding message string, as an 8-bit string encoded with the
425-
catalog's encoding, if known. If there is no entry in the catalog
426-
for the *message* id and *context*, and a fallback has been set, the
427-
look up is forwarded to the fallback's :meth:`pgettext` method.
428-
Otherwise, the *message* id is returned.
424+
corresponding message string, as a Unicode string. If there is no
425+
entry in the catalog for the *message* id and *context*, and a fallback
426+
has been set, the look up is forwarded to the fallback's
427+
:meth:`pgettext` method. Otherwise, the *message* id is returned.
429428

430429
.. versionadded:: 3.8
431430

@@ -434,8 +433,8 @@ unexpected, or if other problems occur while reading the file, instantiating a
434433

435434
Do a plural-forms lookup of a message id. *singular* is used as the
436435
message id for purposes of lookup in the catalog, while *n* is used to
437-
determine which plural form to use. The returned message string is an
438-
8-bit string encoded with the catalog's encoding, if known.
436+
determine which plural form to use. The returned message string is a
437+
Unicode string.
439438

440439
If the message id for *context* is not found in the catalog, and a
441440
fallback is specified, the request is forwarded to the fallback's

0 commit comments

Comments
 (0)