On Wed, 14 Oct 2009, Nikos Alexandris wrote:

thanks for the reply. I have in mind (most of the times) a documentation
to describe/ explain step by step what is done. I am a very beginner with
Python, not a good programmer at all and I like to spend a lot of time to
write down what each piece of code does.

Nikos,

  Let me explain more than I did in the last message. You cannot use LaTeX
to document code directly within the source, regardless of language. Each
language has conventions for embedded comments.

  Python is supposed to be quite self-documenting, but I always use
extensive comments to describe that is being done in each function, and why
I'm doing it that way. It's as much for me as for anyone else. I would not
be surprised to find that 30% of my code is comments.

  Make extensive use of the single- and multi-line comments as I wrote in
the previous message and you'll understand your code months or years from
now.

Rich

--
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Reply via email to