summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-06-29 18:03:25 +0000
committerFredrik Lundh <fredrik@pythonware.com>2000-06-29 18:03:25 +0000
commit117909a092eba0b42e6e060eae175e4fc039ea8b (patch)
treebcae2fe4591a120279eeacebbc514cf69cbae026 /Lib
parent805da9d3cf1693916947b79c71fab1cae0402ef8 (diff)
downloadcpython-117909a092eba0b42e6e060eae175e4fc039ea8b.tar.gz
- fixed another split problem
(those semantics are weird...) - got rid of $Id$'s (for the moment, at least). in other words, there should be no more "empty" checkins. - internal: some minor cleanups.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/sre.py8
-rw-r--r--Lib/sre_compile.py1
-rw-r--r--Lib/sre_constants.py1
-rw-r--r--Lib/sre_parse.py1
4 files changed, 4 insertions, 7 deletions
diff --git a/Lib/sre.py b/Lib/sre.py
index e0a51e345b..49e3140bd4 100644
--- a/Lib/sre.py
+++ b/Lib/sre.py
@@ -1,6 +1,5 @@
#
# Secret Labs' Regular Expression Engine
-# $Id$
#
# re-compatible interface for the sre matching engine
#
@@ -135,13 +134,14 @@ def _split(pattern, string, maxsplit=0):
if not m:
break
b, e = m.span()
- if e == i:
+ if b == e:
+ if i >= len(string):
+ break
continue
append(string[i:b])
if g and b != e:
extend(m.groups())
i = e
n = n + 1
- if i < len(string):
- append(string[i:])
+ append(string[i:])
return s
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index a51531b498..c0423750e3 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -1,6 +1,5 @@
#
# Secret Labs' Regular Expression Engine
-# $Id$
#
# convert template to internal format
#
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
index 1c9810fbcf..f5e7894e3b 100644
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -1,6 +1,5 @@
#
# Secret Labs' Regular Expression Engine
-# $Id$
#
# various symbols used by the regular expression engine.
# run this script to update the _sre include files!
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index 8ab36c8698..93a7b5dc99 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -1,6 +1,5 @@
#
# Secret Labs' Regular Expression Engine
-# $Id$
#
# convert re-style regular expression to sre pattern
#