This commit is contained in:
Araq 2014-12-15 20:54:42 +01:00
commit 7cf36add37

View file

@ -45,13 +45,19 @@ Import statement
~~~~~~~~~~~~~~~~
After the ``import`` statement a list of module names can follow or a single
module name followed by an ``except`` to prevent some symbols to be imported:
module name followed by an ``except`` list to prevent some symbols to be
imported:
.. code-block:: nim
import strutils except `%`
import strutils except `%`, toUpper
# doesn't work then:
echo "$1" % "abc"
echo "$1" % "abc".toUpper
It is not checked that the ``except`` list is really exported from the module.
This feature allows to compile against an older version of the module that
lacks does not export these identifiers.
Include statement