Code density

Michele Simionato michele.simionato at poste.it
Fri Jun 18 08:40:20 CEST 2004


j_mckitrick at bigfoot.com (j_mckitrick) wrote in message news:<ec6dce8b.0406171655.2e7c4713 at posting.google.com>...
> Peter Hansen <peter at engcorp.com> wrote in message > Blank lines are a readability tool as much as clear indentation is.
> > Depending on the definition of "sparingly", this may be the one
> > piece of Guido's advice that we've ever ignored... :-)
> 
> I've found myself using even more blank lines in python than C++.  But
> if you look at BitTorrent, for example, the author claims blank lines
> are a nuisance.  He writes very dense code, but I wonder if it would
> be easily maintainable by anyone besides him.
> 
> 
> jonathon

He also does not use docstrings. I think BitTorrent code is not
typical
in this respect. Look at the code in the standard library if you want
to see how the core Python developer write. Reading the modules
written by Tim Peters
is especially entertaining (lots of <winks> and LOL remarks ;)
I also would take them as examples when teaching clarity in coding.


               Michele Simionato



More information about the Python-list mailing list