[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-02-05 Thread Russ Cox
Russ Cox added the comment: > Named Unicode characters eg \N{LATIN CAPITAL LETTER A} These descriptions are not as stable as, say, Unicode code point values or language names. Are you sure it is a good idea to depend on them not being adjusted in the future? It's certainly nice

[issue2650] re.escape should not escape underscore

2008-05-08 Thread Russ Cox
Russ Cox <[EMAIL PROTECTED]> added the comment: On Thu, May 8, 2008 at 12:12 PM, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > > Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: > > On Thu, May 8, 2008 at 11:45 AM, Russ Cox <[EMAIL PROTECTED]>

[issue2650] re.escape should not escape underscore

2008-05-08 Thread Russ Cox
Russ Cox <[EMAIL PROTECTED]> added the comment: > You don't need to get so defensive. I did not raise a performance > problem, I was simply responding to Rafael's "AFAIK the lookup on > dictionaries is faster than on lists" comment. I did not say that you &g

[issue2650] re.escape should not escape underscore

2008-05-08 Thread Russ Cox
Russ Cox <[EMAIL PROTECTED]> added the comment: > Lorenz's patch uses a set, not a list for special characters. Set > lookup is as fast as dict lookup, but a set takes less memory because it > does not have to store dummy values. More importantly, use of frozenset >

[issue433024] SRE: (?flag) isn't properly scoped

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue433024> ___ Python-bugs-list mailin

[issue1721518] Small case which hangs

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1721518> _ ___ Python-bugs-list mailin

[issue1297193] Search is to long with regex like ^(.+|dontmatch)*$

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1297193> _ ___ Python-bugs-list mailin

[issue1647489] zero-length match confuses re.finditer()

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1647489> _ ___ Python-bugs-list mailin

[issue1693050] \w not helpful for non-Roman scripts

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1693050> _ ___ Python-bugs-list mailin

[issue433030] SRE: Atomic Grouping (?>...) is not supported

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue433030> ___ Python-bugs-list mailin

[issue1662581] the re module can perform poorly: O(2**n) versus O(n**2)

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1662581> _ ___ Python-bugs-list mailin

[issue1160] Medium size regexp crashes python

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1160> __ ___ Python-bugs-list mailing list

[issue2537] re.compile(r'((x|y+)*)*') should fail

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2537> __ ___ Python-bugs-list mailing list

[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-04-24 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- nosy: +rsc __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2636> __ ___ Python-bugs-list mailing list

[issue2650] re.escape should not escape underscore

2008-04-24 Thread Russ Cox
Russ Cox <[EMAIL PROTECTED]> added the comment: > The loop in escape should really use enumerate > instead of "for i in range(len(pattern))". It needs i to edit s[i]. > Instead of using a loop, can't the test just > use "self.assertEqual(re.esacpe(same

[issue2650] re.escape should not escape underscore

2008-04-23 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file10080/re.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Russ Cox
Russ Cox <[EMAIL PROTECTED]> added the comment: > It seems that escape is pretty dumb. The documentations says that > re.escape escapes all non-alphanumeric characters, and it does that > faithfully. It would seem more useful to have a list of meta-characters > and just esc

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Russ Cox
Changes by Russ Cox <[EMAIL PROTECTED]>: -- components: +Regular Expressions __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2650> __ ___ Python

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Russ Cox
New submission from Russ Cox <[EMAIL PROTECTED]>: import re print re.escape("_") Prints \_ but should be _. This behavior differs from Perl and other systems: _ is an identifier character and as such does not need to be escaped. -- messages: 65585 nosy: rsc severit