summaryrefslogtreecommitdiffstats
path: root/Lib/sre.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-06-30 07:50:59 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-06-30 07:50:59 (GMT)
commit90a07913229ada1bb3011cfa08a1e56bca31daaf (patch)
tree753ada4e42f130dddf2af3bccfecaafd5987abbf /Lib/sre.py
parentdf02d0b3f0f438e6a773528010cc360d01b8f393 (diff)
downloadcpython-90a07913229ada1bb3011cfa08a1e56bca31daaf.zip
cpython-90a07913229ada1bb3011cfa08a1e56bca31daaf.tar.gz
cpython-90a07913229ada1bb3011cfa08a1e56bca31daaf.tar.bz2
- pedantic: make sure "python -t" doesn't complain...
Diffstat (limited to 'Lib/sre.py')
-rw-r--r--Lib/sre.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/sre.py b/Lib/sre.py
index fef4983..97a5140 100644
--- a/Lib/sre.py
+++ b/Lib/sre.py
@@ -98,7 +98,7 @@ def _subn(pattern, template, string, count=0):
if callable(template):
filter = template
else:
- template = sre_parse.parse_template(template, pattern)
+ template = sre_parse.parse_template(template, pattern)
def filter(match, template=template):
return sre_parse.expand_template(template, match)
n = i = 0
@@ -109,11 +109,11 @@ def _subn(pattern, template, string, count=0):
m = c.search()
if not m:
break
- b, e = m.span()
+ b, e = m.span()
if i < b:
append(string[i:b])
append(filter(m))
- i = e
+ i = e
n = n + 1
append(string[i:])
return string[:0].join(s), n
@@ -130,15 +130,15 @@ def _split(pattern, string, maxsplit=0):
m = c.search()
if not m:
break
- b, e = m.span()
- if b == e:
- if i >= len(string):
- break
- continue
+ b, e = m.span()
+ if b == e:
+ if i >= len(string):
+ break
+ continue
append(string[i:b])
- if g and b != e:
- extend(m.groups())
- i = e
+ if g and b != e:
+ extend(m.groups())
+ i = e
n = n + 1
append(string[i:])
return s