Skip to content

Commit 08685eb

Browse files
serhiy-storchakamiss-islington
authored andcommitted
gh-74955: Document that __all__ must contain strings in normalization form NFKC (GH-144504)
(cherry picked from commit c81e184) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 7d04956 commit 08685eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/reference/simple_stmts.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,9 @@ where the :keyword:`import` statement occurs.
834834

835835
The *public names* defined by a module are determined by checking the module's
836836
namespace for a variable named ``__all__``; if defined, it must be a sequence
837-
of strings which are names defined or imported by that module. The names
837+
of strings which are names defined or imported by that module.
838+
Names containing non-ASCII characters must be in the `normalization form`_
839+
NFKC; see :ref:`lexical-names-nonascii` for details. The names
838840
given in ``__all__`` are all considered public and are required to exist. If
839841
``__all__`` is not defined, the set of public names includes all names found
840842
in the module's namespace which do not begin with an underscore character
@@ -868,6 +870,8 @@ determine dynamically the modules to be loaded.
868870

869871
.. audit-event:: import module,filename,sys.path,sys.meta_path,sys.path_hooks import
870872

873+
.. _normalization form: https://www.unicode.org/reports/tr15/#Norm_Forms
874+
871875
.. _future:
872876

873877
Future statements

0 commit comments

Comments
 (0)