Re: [BangPypers] Python code documentation doubt
On 04/22/2010 12:29 PM, JAGANADH G wrote: Dear All where can I find some guide/guidelines for code documentation like this single_record.pmid u'7024555' single_record + - B{.title} - B{.pmid} - B{.Abs} I{(abstracts)} - B{.year} I am looking for a guide to learn the technique of writing such kind of code document in my module. From what you've posted, it looks more like the __repr__ of the 'pmid' object rather than code documentation. Here is a console session (pretty self explanatory) demonstrating the use of __repr__ ...and a bit more (ie: the difference between that and __str__ ) : -- class A: ... def __init__(self, x): ... self.x = x ... ... def __str__(self): ... return str(self.x) ... ... def __repr__(self): ... return I am a %s with the value %d % (self.__class__, self.x) ... a = A() a = A(10) a I am a __main__.A with the value 10 print a 10 -- If you need additional explanation or clarification, please ask. hth, cheers, - steve -- random new spiel: http://lonetwin.net/ random old spiel: http://lonetwin.blogspot.com/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python code documentation doubt
On Thu, Apr 22, 2010 at 12:29:30PM +0530, JAGANADH G wrote: I am looking for a guide to learn the technique of writing such kind of code document in my module. The Documentation for modules and functions is called 'docstrings'. PEP: 257 - is the 'immortalized' pep for docstring conventions. Also look at pep-0007 and pep-0008 for coding standards. And google for docutils, restructured text, you might get all the references you want. On a site note, the one you pointed out seems to be project specific and not standard docstrings. -- Senthil Are you making all this up as you go along? ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python code documentation doubt
On Thu, Apr 22, 2010 at 12:57 PM, steve st...@lonetwin.net wrote: On 04/22/2010 12:29 PM, JAGANADH G wrote: Dear All where can I find some guide/guidelines for code documentation like this single_record.pmid u'7024555' single_record + - B{.title} - B{.pmid} - B{.Abs} I{(abstracts)} - B{.year} I am looking for a guide to learn the technique of writing such kind of code document in my module. From what you've posted, i http://bitbucket.org/jagan/bioreadernltk/src/tip/bioreader.py -- ** JAGANADH G http://jaganadhg.freeflux.net/blog ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python code documentation doubt
On Thu, Apr 22, 2010 at 12:58 PM, Senthil Kumaran orsent...@gmail.comwrote: On Thu, Apr 22, 2010 at 12:29:30PM +0530, JAGANADH G wrote: I am looking for a guide to learn the technique of writing such kind of code document in my module. The Documentation for modules and functions is called 'docstrings'. PEP: 257 - is the 'immortalized' pep for docstring conventions. Also look at pep-0007 and pep-0008 for coding standards. And google for docutils, restructured text, you might get all the references you want. On a site note, the one you pointed out seems to be project specific and not standard docstrings. Ya it is from the project http://bitbucket.org/jagan/bioreadernltk/src/tip/bioreader.py I will try the documents suggested by you. I got the idea now . Thanks for the help -- ** JAGANADH G http://jaganadhg.freeflux.net/blog ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Python code documentation doubt
epydoc is python specific and uses custom markup in the doc strings. I think is was pre Rest. It might be a good place to start looking. There might be some guidelines in the sphinx docs about this as well. On 4/22/10, JAGANADH G jagana...@gmail.com wrote: On Thu, Apr 22, 2010 at 12:58 PM, Senthil Kumaran orsent...@gmail.comwrote: On Thu, Apr 22, 2010 at 12:29:30PM +0530, JAGANADH G wrote: I am looking for a guide to learn the technique of writing such kind of code document in my module. The Documentation for modules and functions is called 'docstrings'. PEP: 257 - is the 'immortalized' pep for docstring conventions. Also look at pep-0007 and pep-0008 for coding standards. And google for docutils, restructured text, you might get all the references you want. On a site note, the one you pointed out seems to be project specific and not standard docstrings. Ya it is from the project http://bitbucket.org/jagan/bioreadernltk/src/tip/bioreader.py I will try the documents suggested by you. I got the idea now . Thanks for the help -- ** JAGANADH G http://jaganadhg.freeflux.net/blog ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- ~noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers