Documenting Regex (and code)

2011-06-06 Thread Richard Parker
- Dense and complex REs are quite powerful, but may also contain and hide programming mistakes. The ability to describe what is intended -- which may differ from what is written -- is useful. --

Re: Python-list Digest, Vol 92, Issue 232

2011-05-27 Thread Richard Parker
Sometimes >> I'll drop in suggestions to future maintainers like, "consider >> refactoring with with perform_frobnitz_action()" > > Usually, I address future-me with comments like that (on the > assumption that there's nobody in the world sadistic enough to want to > maintain my code). But I neve

The worth of comments

2011-05-26 Thread Richard Parker
On May 26, 2011, at 4:28 AM, python-list-requ...@python.org wrote: > My experience is that comments in Python are of relatively low > usefulness. (For avoidance of doubt: not *zero* usefulness, merely low.) > I can name variables, functions and classes with sensible, self- > documenting names. W

Re: Python-list Digest, Vol 92, Issue 223

2011-05-25 Thread Richard Parker
> > On Thu, May 26, 2011 at 10:58 AM, Richard Parker > wrote: >> It's time to stop having flame wars about languages and embrace programmers >> who care enough about possible future readers of their code to thoroughly >> comment it. Comments are far more valu

Re: Python-list Digest, Vol 92, Issue 221

2011-05-25 Thread Richard Parker
> Writing code is primarily for *human readers*. Once you've compiled the > code once, the computer never need look at it again, but human being come > back to read it over and over again, to learn from it, or for > maintenance. We rightfully value our own time and convenience as more > valuab