Why are String Formatted Queries Considered So Magical?

Stephen Hansen me+list/python at ixokai.io
Wed Jun 30 11:23:24 EDT 2010


On 6/30/10 7:14 AM, Jorgen Grahn wrote:
> On Tue, 2010-06-29, Stephen Hansen wrote:
>> On 6/29/10 5:41 AM, Roy Smith wrote:
>>> Nobody<nobody at nowhere.com>   wrote:
>>>
>>>>> And what about regular expressions?
>>>>
>>>> What about them? As the saying goes:
>>>>
>>>> 	Some people, when confronted with a problem, think
>>>> 	"I know, I'll use regular expressions."
>>>> 	Now they have two problems.
>>>
>>> That's silly.  RE is a good tool.  Like all good tools, it is the right
>>> tool for some jobs and the wrong tool for others.
>>
>> There's nothing silly about it.
>>
>> It is an exaggeration though: but it does represent a good thing to keep
>> in mind.
>
> Not an exaggeration: it's an absolute. It literally says that any time
> you try to solve a problem with a regex, (A) it won't solve the problem
> and (B) it will in itself become a problem.  And it doesn't tell you
> why: you're supposed to accept or reject this without thinking.
>
> How can that be a good thing to keep in mind?

That it speaks in absolutes is what makes it an exaggeration. Yes, it 
literally says something kind of like that (Your 'a' is a 
mischaracterization).

It's still a very good thing to keep in mind.

Its a "saying" -- a proverb, an expression. Since when are the wise 
remarks of our ancient forefathers literal? Not last I checked.

Reading into a saying as not a guide or suggestion or cautionary tale 
but instead a doctrinal absolute is where we run into problems, not in 
the repeating of them.

-- 

    ... Stephen Hansen
    ... Also: Ixokai
    ... Mail: me+list/python (AT) ixokai (DOT) io
    ... Blog: http://meh.ixokai.io/




More information about the Python-list mailing list