[Python-Dev] Re: python-dev Summary for 2004-08-01 through
2004-08-15[draft]
Mike Coleman
mkc at mathdogs.com
Mon Aug 23 01:47:43 CEST 2004
> Mike Coleman presented a pre-PEP on adding a function to re that would create
> ...
> Contributing threads:
> - `pre-PEP: Complete, Structured Regular Expression Group Matching
> <http://mail.python.org/pipermail/python-dev/2004-August/047042.html>`__
The original PEP (which you link to here) is almost incomprehensible due to my
typos, etc. You might want to link to the corrected version here
http://mail.python.org/pipermail/python-dev/2004-August/047238.html
in addition, or instead.
> Mike Coleman wrote up a patch for re.split() that AM Kuchling presented to the
> list. It adds an argument to the function to allow an empty string to be put
> into the resulting list when a match occurs, even if the match consumes no
> characters.
On this, it might be clearer to add something like
The point is that splitting on empty patterns lets you break up text
without losing the delimiting parts. So, for example, splitting on
r'(?=^S)' breaks a string into "paragraphs", where a paragraph begins with
a line that starts with 'S'.
BTW, FWIW, I read your python-dev summaries religiously. No way would I have
time to read python-dev itself, so your summaries are the only thing that
allows me to follow along. Thank you!!!
Mike
More information about the Python-Dev
mailing list