If you move your cursor inside the docstring, the modeline will change from "(Python MMM Font)" to "(Python[Doctest] MMM Font)", signifying that you are now using doctest-mode. |
def x_intercept(m, b): """ Return the x intercept of the line y=m*x+b. >>> x_intercept(3, 6) -2.0 >>> x_intercept(-4, 2) 0.5. """ return -float(b)/m ISO8---Emacs: mytest.py (Python[Doctest] MMM Font)----L7--All-- |