Website hosting service by

 Back to Index

5.2.2 Which Docstrings Are Examined?

See the docstrings in for all the details. They're unsurprising: the module docstring, and all function, class and method docstrings are searched. Optionally, the tester can be directed to exclude docstrings attached to objects with private names. Objects imported into the module are not searched.

In addition, if M.__test__ exists and "is true", it must be a dict, and each entry maps a (string) name to a function object, class object, or string. Function and class object docstrings found from M.__test__ are searched even if the tester has been directed to skip over private names in the rest of the module. In output, a key K in M.__test__ appears with name


<name of M>.__test__.K

Any classes found are recursively searched similarly, to test docstrings in their contained methods and nested classes. While private names reached from M's globals can be optionally skipped, all names reached from M.__test__ are searched.





2002-2004 Webhosting Service


Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to


Domain registration : Buy domain name or register domain name from $5.95/year only


Cheap domain registration : Register domain name or buy domain name, including free domain hosting services offers cheap domain registration, domain name transfer and domain search services