person emp object regardless of whether you will ever code or use such toolsthis example demonstrates one of the many ways that you can make use of special attributes that expose interpreter internals you'll see another when we code the lister py general-purpose class display tools in ' section "multiple inheritance"mix-inclasseson page --therewe will extend this technique to also display attributes in each object in class tree and function as common superclass in the last part of this bookwe'll revisit such tools in the context of python tool building at largeto code tools that implement attribute privacyargument validationand more while not in every python programmer' job descriptionaccess to internals enables powerful development tools documentation strings revisited the last section' example includes docstring for its modulebut remember that docstrings can be used for class components as well docstringswhich we covered in detail in are string literals that show up at the top of various structures and are automatically saved by python in the corresponding objects__doc__ attributes this works for module filesfunction defsand classes and methods now that we know more about classes and methodsthe following filedocstr pyprovides quick but comprehensive example that summarizes the places where docstrings can show up in your code all of these can be triple-quoted blocks or simpler one-liner literals like those here" amdocstr __doc__def func(args)" amdocstr func __doc__pass class spam" amspam __doc__ or docstr spam __doc__ or self __doc__def method(self)" amspam method __doc__ or self method __doc__print(self __doc__print(self method __doc__the main advantage of documentation strings is that they stick around at runtime thusif it' been coded as docstringyou can qualify an object with its __doc__ attribute to fetch its documentation (printing the result interprets line breaks if it' multiline string)import docstr docstr __doc__ class coding details