[issue13219] re module doc has minor inaccuracy in character sets

2011-10-20 Thread Ezio Melotti
Ezio Melotti added the comment: Indeed. The "tricks" of putting '-' at the beginning/end and ']' at the beginning are well known and works with most of the implementations afaik, but I would consider the behavior of [._-a-z] as an implementation detail and don't expect it to work elsewhere.

[issue13219] re module doc has minor inaccuracy in character sets

2011-10-20 Thread Florent Xicluna
Florent Xicluna added the comment: Well, the actual behavior is a little bit more complex to describe. >>> re.match('[.-_a-z]', '-') >>> re.match('[._-a-z]', '-') <_sre.SRE_Match object at 0x100418e80> >>> re.match('[.-_a-z]', 'b') <_sre.SRE_Match object at 0x100418b88> >>> re.match('[._-a-z]

[issue13219] re module doc has minor inaccuracy in character sets

2011-10-20 Thread Ezio Melotti
Ezio Melotti added the comment: Done, thanks for the report! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue13219] re module doc has minor inaccuracy in character sets

2011-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07eca800cdb4 by Ezio Melotti in branch '2.7': #13219: clarify section about character sets in the re documentation. http://hg.python.org/cpython/rev/07eca800cdb4 New changeset dc96a89ac192 by Ezio Melotti in branch '3.2': #13219: clarify section ab

[issue13219] re module doc has minor inaccuracy in character sets

2011-10-19 Thread Ezio Melotti
Ezio Melotti added the comment: Here's a patch against 2.7. I rephrased the section a bit. If it's more understandable I'll commit it. -- assignee: docs@python -> ezio.melotti keywords: +patch nosy: +ezio.melotti stage: -> commit review versions: +Python 3.2, Python 3.3 Added file:

[issue13219] re module doc has minor inaccuracy in character sets

2011-10-19 Thread becky lewis
New submission from becky lewis : The documentation for the re module (specifically the section for []) states that: "If you want to include a ']' or a '-' inside a set, precede it with a backslash, or place it as the first character." However, after finding a typo in a regex I wrote it turn