`re' difficulty?

François Pinard pinard at IRO.UMontreal.CA
Tue Oct 19 11:29:26 EDT 1999


"Tim Peters" <tim_one at email.msn.com> écrit:

> Are you sure you used to hack Perl <0.7 wink>?

I did a lot of Perl, but I do not consider myself as a hacker.  More of an
artist or a stylist, maybe :-).  All winks apart, I try to write clear and
straightforward code, to the point of boredom sometimes, and do not like
bugs very much.  In fact, I'm a child of the Dijkstra school of thought.
So I might program for years, without much chance to discover peculiarities
of a language, because I stay so safely between the tracks, all the time :-).
On the other hand, Python is so clearly designed, at least as far as I
understand it, that I'm ready to dare some unusual exploration.  It's fun!

> Possibly.  OTOH, Python could "optimize" <wink> the regexp
>     cat|catfish
> to plain
>     cat
> since it's impossible for catfish to match without first matching cat.

Maybe, but _this_ is rather plain.  I'm not sure it would be really worth.
At least, much, much less interesting that longuest matches... :-)

> Jeffrey Friedl's book [...]

I do not buy much books, but thanks for the reference, and the explanations.
You have been quite helpful to me, Tim, since I got around.  Thanks a lot!

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list