Using doctest-mode inside python-mode (4/7)

All of the normal doctest-mode editing functionality becomes available whenever your cursor is inside a docstring. Try adding a new doctest example to the docstring.

Next Page...

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
        >>> x_intercept(-2, 0)
        0.0.
    """
    return -float(b)/m








ISO8---Emacs: mytest.py   (Python[Doctest] MMM Font)----L9--All--