D'Arcy J.M. Cain wrote:
On Thu, 28 Jan 2010 18:49:02 +0100
Jean-Michel Pichavant <jeanmic...@sequans.com> wrote:
Using regexp may increase readability (if you are familiar with it).

If you have a problem and you think that regular expressions are the
solution then now you have two problems.  Regex is really overkill for
the OP's problem and it certainly doesn't improve readability.

It depends on the reader ability to understand a *simple* regexp.
It is also strange to get such answer after taking so much precautions, so let me quote myself:

"Using regexp *may* increase readability (*if* you are *familiar* with it)." I honestly find it quite readable in the sample code I provided and spares all the if-len-startwith-strip logic, but If the OP does not agree, fine with me. But there's no need to get certain that I'm completly wrong.

JM


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to