classification
Title: Regex howto: revision pass
Type: enhancement Stage: resolved
Components: Documentation, Regular Expressions Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: akuchling, docs@python, ezio.melotti, mrabarnett, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2013-07-26 16:07 by akuchling, last changed 2013-08-18 23:01 by akuchling. This issue is now closed.

Files
File name Uploaded Description Edit
regex.diff akuchling, 2013-07-26 16:07 Changes to regex.rst review
regex.diff akuchling, 2013-08-18 00:34 Reword discussion of precompiling discussion review
Messages (5)
msg193733 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-07-26 16:07
I read through the 3.3 regex howto and have made various edits in the attached patch.

* describe how \w is different when used in bytes and Unicode patterns.

* describe re.ASCII flag to change that behaviour.

* remove a personal reference ('I generally prefer...')

* some small edits and re-wording.
msg195537 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-08-18 00:34
Slightly revised version that modifies the discussion of when to pre-compile a regex and when to not bother.  I don't think this is a very important issue, so I don't think it needs a long discussion.
msg195538 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-08-18 00:44
Well, this is already too long IMO. Two sentences should suffice. If you are calling a regex very often in a loop, then it makes sense to compile it. Otherwise, don't bother.
msg195567 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-08-18 15:27
#17441 also has a discussion about regex caching that might be relevant.
msg195584 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-08-18 22:57
New changeset 366ca21600c9 by Andrew Kuchling in branch '3.3':
#18562: various revisions to the regex howto for 3.x
http://hg.python.org/cpython/rev/366ca21600c9
History
Date User Action Args
2013-08-18 23:01:32akuchlingsetstage: patch review -> resolved
2013-08-18 23:01:22akuchlingsetstatus: open -> closed
resolution: fixed
2013-08-18 22:57:33python-devsetnosy: + python-dev
messages: + msg195584
2013-08-18 15:27:32ezio.melottisetmessages: + msg195567
2013-08-18 00:44:15pitrousetnosy: + pitrou
messages: + msg195538
2013-08-18 00:34:19akuchlingsetfiles: + regex.diff

messages: + msg195537
2013-08-06 06:12:13ezio.melottisetnosy: + mrabarnett
type: enhancement
components: + Regular Expressions
2013-07-26 16:13:16berker.peksagsetnosy: + ezio.melotti

versions: + Python 3.4
2013-07-26 16:07:35akuchlingcreate