Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7119

Re: Lambda question

From harrismh777 <harrismh777@charter.net>
Newsgroups comp.lang.python
Subject Re: Lambda question
References <20110606134215.3EYA9.180297.root@cdptpa-web25-z02> <mailman.2494.1307379170.9059.python-list@python.org> <4ded5fda$0$29996$c3e8da3$5496439d@news.astraweb.com>
Message-ID <fSdHp.1437$xh5.1370@newsfe02.iad> (permalink)
Date 2011-06-06 19:00 -0500

Show all headers | View raw


Steven D'Aprano wrote:
> For any non-trivial function, I usually start by writing the
> documentation (a docstring and doctests) first. How else do you know what
> the function is supposed to do if you don't have it documented?

Yes. In my early years I was no different than any other hacker in terms 
of documenting last if at all... but having flown around the sun a few 
more times I've realized that good clear doc 'before' the code actually 
helps me write good clean code. If I implement what I've documented then 
I'm less likely to miss something in the doc, and more likely to have 
fewer bugs... this has played itself out many times for me.



kind regards,
m harris

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Lambda question Terry Reedy <tjreedy@udel.edu> - 2011-06-06 12:52 -0400
  Re: Lambda question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-06 23:16 +0000
    API design before implementation (was: Lambda question) Ben Finney <ben+python@benfinney.id.au> - 2011-06-07 09:54 +1000
    Re: Lambda question harrismh777 <harrismh777@charter.net> - 2011-06-06 19:00 -0500

csiph-web