Regex anomaly

Ron Garret rNOSPAMon at flownet.com
Tue Jan 3 12:37:46 EST 2006


In article <roy-179346.09193603012006 at reader2.panix.com>,
 Roy Smith <roy at panix.com> wrote:

> In article <1136283651.921032.321000 at f14g2000cwb.googlegroups.com>,
>  "Sam Pointon" <free.condiments at gmail.com> wrote:
> 
> > Would this particular inconsistency be candidate for change in Py3k?
> > Seems to me the pos and endpos arguments are redundant with slicing,
> > and the re.match function would benefit from having the same arguments
> > as pattern.match. Of course, this is a backwards-incompatible change;
> > that's why I suggested Py3k.
> 
> I don't see any way to implement re.I at match time;

It's easy: just compile two machines, one with re.I and one without and 
package them as if they were one.  Then use the flag to pick a compiled 
machine at run time.

rg



More information about the Python-list mailing list