Russ Cox r...@swtch.com 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
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
instead of dict makes the code
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
*should* rewrite your patch the way I
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] wrote:
..
My argument is only that Python
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), same)?
Done.
Also, please add tests
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2537
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1160
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1662581
_
___
Python-bugs-list mailing list
Unsubscribe
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue433030
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1693050
_
___
Python-bugs-list mailing list
Unsubscribe
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1647489
_
___
Python-bugs-list mailing list
Unsubscribe
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1297193
_
___
Python-bugs-list mailing list
Unsubscribe
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1721518
_
___
Python-bugs-list mailing list
Unsubscribe
Changes by Russ Cox [EMAIL PROTECTED]:
--
nosy: +rsc
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue433024
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Russ Cox [EMAIL PROTECTED]:
--
keywords: +patch
Added file: http://bugs.python.org/file10080/re.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2650
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
severity: normal
status: open
Changes by Russ Cox [EMAIL PROTECTED]:
--
components: +Regular Expressions
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2650
__
___
Python-bugs-list mailing list
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 escape those. This is more true
19 matches
Mail list logo