Add a mention of the True/False returns with __virtual__()

And their relationship to `__virtualname__`.

Fixes #42375
This commit is contained in:
rallytime 2017-07-24 13:22:50 -06:00
parent 4bf35a74de
commit fa466519c4

View file

@ -405,6 +405,10 @@ similar to the following:
return __virtualname__
return False
Note that the ``__virtual__()`` function will return either a ``True`` or ``False``
value. If it returns a ``True`` value, this ``__virtualname__`` module-level attribute
can be set as seen in the above example. This is the name that the module should be
referred to as.
Documentation
=============