summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLeon <github@adigitoleo.dissimulo.com>2022-01-14 00:40:27 +1100
committerGitHub <noreply@github.com>2022-01-13 14:40:27 +0100
commita9135095f02587430b179a33ae03910d0d4201cd (patch)
treec06525ef6678349f58b19d3a2a04a82a74e0255b
parentada815e45957e5675a9ac978b85b8467d68c5945 (diff)
downloadNim-a9135095f02587430b179a33ae03910d0d4201cd.tar.gz
docs: Mention `import foo {.all.}` syntax (#19377)
Mention the `import foo {.all.}` syntax in the manual,
with a caveat about private imports.
Also link to the experimental importutils module.

Co-authored-by: adigitoleo <adigitoleo@dissimulo.com>
-rw-r--r--doc/manual_experimental.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/manual_experimental.rst b/doc/manual_experimental.rst
index 4ed8439df..0f82b9950 100644
--- a/doc/manual_experimental.rst
+++ b/doc/manual_experimental.rst
@@ -168,6 +168,17 @@ This feature will likely be superseded in the future by support for
 recursive module dependencies.
 
 
+Importing private symbols
+=========================
+
+In some situations, it may be useful to import all symbols (public or private)
+from a module. The syntax `import foo {.all.}` can be used to import all
+symbols from the module `foo`. Note that importing private symbols is
+generally not recommended.
+
+See also the experimental `importutils <importutils.html>`_ module.
+
+
 Code reordering
 ===============