> 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4