Python and Regular Expressions
neilc at norwich.edu
Mon Apr 12 08:09:32 EDT 2010
On 2010-04-11, Steven D'Aprano
<steve at REMOVE-THIS-cybersource.com.au> wrote:
> On Sat, 10 Apr 2010 10:11:07 -0700, Patrick Maupin wrote:
>> On Apr 10, 11:35??am, Neil Cerutti <ne... at norwich.edu> wrote:
>>> On 2010-04-10, Patrick Maupin <pmau... at gmail.com> wrote:
>>> > as Pyparsing". ??Which is all well and good, except then the OP will
>>> > download pyparsing, take a look, realize that it uses regexps under
>>> > the hood, and possibly be very confused.
>>> I don't agree with that. If a person is trying to ski using pieces of
>>> wood that they carved themselves, I don't expect them to be surprised
>>> that the skis they buy are made out of similar materials.
>> But, in this case, the guy ASKED how to make the skis in his woodworking
>> shop, and was told not to be silly -- you don't use wood to make skis --
>> and then directed to go buy some skis that are, in fact, made out of
> As entertaining as this is, the analogy is rubbish.
You should have seen the car engine analogy I thought up at
> Skis are far too simple to use as an analogy for a parser (he
> says, having never seen skis up close in his life *wink*).
> Have you looked at PyParsing's source code? Regexes are only a
> small part of the parser, and not analogous to the wood of
I was mainly trying to get accross my incredulity that somebody
should be surprised a parsing package uses regexes under the
good. But for the record, a set of downhill skis comes with a
really fancy interface layer:
More information about the Python-list