Skip to content

Commit c81e184

Browse files
gh-74955: Document that __all__ must contain strings in normalization form NFKC (GH-144504)
1 parent 50e107f commit c81e184

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
@@ -831,7 +831,9 @@ where the :keyword:`import` statement occurs.
831831

832832
The *public names* defined by a module are determined by checking the module's
833833
namespace for a variable named ``__all__``; if defined, it must be a sequence
834-
of strings which are names defined or imported by that module. The names
834+
of strings which are names defined or imported by that module.
835+
Names containing non-ASCII characters must be in the `normalization form`_
836+
NFKC; see :ref:`lexical-names-nonascii` for details. The names
835837
given in ``__all__`` are all considered public and are required to exist. If
836838
``__all__`` is not defined, the set of public names includes all names found
837839
in the module's namespace which do not begin with an underscore character
@@ -865,6 +867,8 @@ determine dynamically the modules to be loaded.
865867

866868
.. audit-event:: import module,filename,sys.path,sys.meta_path,sys.path_hooks import
867869

870+
.. _normalization form: https://www.unicode.org/reports/tr15/#Norm_Forms
871+
868872
.. _future:
869873

870874
Future statements

0 commit comments

Comments
 (0)