FW: [Python-Dev] Noam's open regex requests
python at rcn.com
Wed Sep 22 22:32:00 CEST 2004
Haven't heard a peep on this one.
Is anyone going to be miffed if I accept Noam's requests?
From: python-dev-bounces+python=rcn.com at python.org
[mailto:python-dev-bounces+python=rcn.com at python.org] On Behalf Of
Sent: Saturday, September 18, 2004 6:34 PM
To: python-dev at python.org
Cc: 'Noam Raphael'
Subject: [Python-Dev] Noam's open regex requests
> I've suggested three things that I think should be done in that
> case, and nobody objected.
> 1. Add a prominent note in the module contents page or in the module's
> main page, stating that some functionality can only be acheived by
> compiled REs.
I would make that read "The methods of compiled regular expressions
allow more options than their simplified function counterparts. Most
non-trivial applications always use the compiled form."
> 2. Document the optional parameters which let you specify the start
> end pos in the findall and finditer methods of a compiled RE object.
This seems reasonable to me. The API is already exposed and is useful.
Why not document it. AFAICT, there are no plans to take away the
> 3. Add the optional parameter "flags" to the findall and finditer
> functions. Then, the four functions match, search, findall and
> would have the same interface: function(pattern, string[, flags]).
This also seems reasonable to me. It is marginally useful and it may
reduce the learning curve ever so slightly. There is nothing special
about findall() and finditer() that makes them different from match()
and search() with respect to flags.
Python-Dev mailing list
Python-Dev at python.org
More information about the Python-Dev