Re: Q re documentation Python style

2008-06-10 Thread Ethan Furman
kj wrote: I'm a Perlhead trying to learn the Way of Python. I like Python overall, but every once in a while I find myself trying to figure out why Python does some things the way it does. At the moment I'm scratching my head over Python's docstrings. As far as I understand this is the

Re: Q re documentation Python style

2008-06-09 Thread Bruno Desthuilliers
kj a écrit : (snip) I think that sometimes even simple functions require a lot of documentation. For example, I want to document a function that takes a dictionary as argument, and this dictionary is expected to have 5 keys. (When the number of mandatory arguments gets above 4, I find that

Re: Q re documentation Python style

2008-06-09 Thread bearophileHUGS
kj: I have some functions that require a very long docstring to document, and somehow I find it a bit disconcerting to stick a few screenfuls of text between the top line of a function definition and its body. You may put the main function(s) documentation in the docstring of the module, and

Re: Q re documentation Python style

2008-06-09 Thread kj
Wow. That was a great bunch of advice. Thank you all very much! Kynn -- NOTE: In my address everything before the first period is backwards; and the last period, and everything after it, should be discarded. -- http://mail.python.org/mailman/listinfo/python-list

Q re documentation Python style

2008-06-08 Thread kj
I'm a Perlhead trying to learn the Way of Python. I like Python overall, but every once in a while I find myself trying to figure out why Python does some things the way it does. At the moment I'm scratching my head over Python's docstrings. As far as I understand this is the standard way to

Re: Q re documentation Python style

2008-06-08 Thread Diez B. Roggisch
I guess this is a rambling way to ask: are docstrings *it* as far Python documentation goes? Or is there a second, more flexible system? Docstrings are it. Yet there are several ways how their content is interpreted. Google for example epydoc. You can embed links that way. I don't know

Re: Q re documentation Python style

2008-06-08 Thread Timothy Grant
On Sun, Jun 8, 2008 at 2:17 PM, kj [EMAIL PROTECTED] wrote: I'm a Perlhead trying to learn the Way of Python. I like Python overall, but every once in a while I find myself trying to figure out why Python does some things the way it does. At the moment I'm scratching my head over Python's

Re: Q re documentation Python style

2008-06-08 Thread Carl Banks
On Jun 8, 5:17 pm, kj [EMAIL PROTECTED] wrote: I'm a Perlhead trying to learn the Way of Python. Welcome to the light, my son. I guess this is a rambling way to ask: are docstrings *it* as far Python documentation goes? Or is there a second, more flexible system? You can define a

Re: Q re documentation Python style

2008-06-08 Thread John Machin
On Jun 9, 7:17 am, kj [EMAIL PROTECTED] wrote: [snip] For example, I want to document a function that takes a dictionary as argument, and this dictionary is expected to have 5 keys. (When the number of mandatory arguments gets above 4, I find that it's too difficult to remember their order,

Re: Q re documentation Python style

2008-06-08 Thread Scott David Daniels
kj wrote: ... I want to document a function that takes a dictionary as argument, and this dictionary is expected to have 5 keys. When the number of mandatory arguments gets above 4, I find that it's too difficult to remember their order, so I resort to using a dictionary as the single

Re: Q re documentation Python style

2008-06-08 Thread Paddy
On Jun 8, 10:17 pm, kj [EMAIL PROTECTED] wrote: I'm a Perlhead trying to learn the Way of Python. I like Python overall, but every once in a while I find myself trying to figure out why Python does some things the way it does. At the moment I'm scratching my head over Python's docstrings.

Re: Q re documentation Python style

2008-06-08 Thread bukzor
On Jun 8, 2:17 pm, kj [EMAIL PROTECTED] wrote: I'm a Perlhead trying to learn the Way of Python.  I like Python overall, but every once in a while I find myself trying to figure out why Python does some things the way it does.  At the moment I'm scratching my head over Python's docstrings.  As