Skip to content

Commit 54cebea

Browse files
authored
Use clearer language
1 parent 479eeae commit 54cebea

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Doc/library/doctest.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,11 @@ their contained methods and nested classes.
352352

353353
.. note::
354354

355-
Only classes and functions defined at the module level (or inside other
356-
classes) are automatically discovered by ``doctest``.
355+
``doctest`` can only automatically discover classes and functions that are
356+
defined at the module level or inside other classes.
357357

358-
Classes or functions defined inside functions cannot be discovered,
359-
because their definitions depend on the state of the enclosing
360-
function. To make them discoverable, define them outside of
361-
the enclosing function.
358+
Since nested classes and functions only exist when an outer function
359+
is called, they cannot be discovered. Define them outside to make them visible.
362360

363361
.. _doctest-finding-examples:
364362

0 commit comments

Comments
 (0)