The Python macros include logical markup for the elements of the language and related concepts. Use the LATEX macros defined in python.sty to format source code, along with function, method, and file names, and so forth. This ensures a uniform appearance. Also, the Python documentation states that sometime in the future, the Python documentation is likely to be converted to XML or some other structured markup, and using the logical markup now will facilitate the transition. Here are some useful examples of such macros. See the ``Inline Markup'' section of ``Documenting Python'' for the complete list (http://www.python.org/doc/current/doc/inline-markup.html).
\module{spam}
\file{parrot.py}
\function{setup()}
\method{append()}
\member{sproket}
\program{pkgtool}
\url{http://www.conglomocorp.com}
\kbd{Control-D}
\samp{import sys; sys.exit()}.
\code{sys.argv[0]}
\class{Exception}
\character{\e n} % this is for \n
\samp{\program{python} \programopt{-m} \var{module} [arg] ...},
\keyword{kwd}
\exception{expt}
\class{Giraffe}
\pytype{string} % built-in Python type
\UNIX % the system
\Cpp{}