mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
- reverted to "\x is binary byte"
- removed evil tabs from sre_parse and sre_compile
This commit is contained in:
parent
1739be50cb
commit
4ccea94152
3 changed files with 6 additions and 6 deletions
|
@ -19,8 +19,9 @@ from sre_constants import *
|
|||
# FIXME: should be 65535, but the arraymodule is still broken
|
||||
MAXREPEAT = 32767
|
||||
|
||||
# FIXME: same here
|
||||
CHARMASK = 0x7fff
|
||||
# FIXME: might change in 2.0 final. but for now, this seems
|
||||
# to be the best way to be compatible with 1.5.2
|
||||
CHARMASK = 0xff
|
||||
|
||||
SPECIAL_CHARS = ".\\[{()*+?^$|"
|
||||
REPEAT_CHARS = "*+?{"
|
||||
|
@ -616,9 +617,9 @@ def expand_template(template, match):
|
|||
a = p.append
|
||||
sep = match.string[:0]
|
||||
if type(sep) is type(""):
|
||||
char = chr
|
||||
char = chr
|
||||
else:
|
||||
char = unichr
|
||||
char = unichr
|
||||
for c, s in template:
|
||||
if c is LITERAL:
|
||||
a(char(s))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue