HappyDoc formatting docstring

Berthold Höllmann hoel at germanlloyd.org
Fri Jun 8 10:16:02 EDT 2001


"Flores Bakker" <fbakker at psy.uva.nl> writes:

> I have a problem using HappyDoc: example code lines in docstrings are
> appended after each other in HappyDoc generated HTML text.for example:
> 
> class Jantje:
>     '''
>     ExampleCode:
> 
>     >>> aBankAccount=BankAccount()
>     >>> aBankAccount.deposit(30)
>     >>> aBankAccount.withdrawal(10)
>     >>> aBankAccount.balance==20
>     1
>     '''

The documentation describes how the indicate raw text (for code
examples). Us two colons as in:

class Jantje:
    '''
    ExampleCode::

    >>> aBankAccount=BankAccount()
    >>> aBankAccount.deposit(30)
    >>> aBankAccount.withdrawal(10)
    >>> aBankAccount.balance==20
    1
    '''

Cheers

Berthold
-- 
       email: hoel at GermanLloyd.org
   )   tel. : +49 (40) 3 61 49 - 73 74
  (
C[_]  These opinions might be mine, but never those of my employer.



More information about the Python-list mailing list