bug-a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Typesetting python docstrings


From: Magnus Hult
Subject: Typesetting python docstrings
Date: Fri, 7 Jan 2005 11:55:27 +0100
User-agent: Mutt/1.4i

Hi,

When typesetting python programs, docstrings (a string occuring as the
first statement of a module, function, class or method) look bad.

This is because strings are (on my system at least) typeset in a
variable-width font.  Therefore, indentation of every line in the
string but the first looks wrong.

Thus, when typesetting the following program

def myfunction():
    """The purpose of this function is to point out
    an indentation problem."""
    pass

the result looks something like

def myfunction():
    """The purpose of this function is to point out
  an indentation problem."""
    pass

because the spaces in the string are not as wide as those in the code.

I run a2ps 4.10.4 with python sheet 1.1 on Solaris 9.

Thanks for a great program
Regards,
Magnus Hult




reply via email to

[Prev in Thread] Current Thread [Next in Thread]