summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-09-04 03:19:48 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-09-04 03:19:48 (GMT)
commit2cb176f3279060a55b650a826ccfe9db538d3cc5 (patch)
tree837aea5e10dc27f6b196b655cc229f0642d6ce2e
parentf4d189f70b768d0eb7309dcecfad40fe0cfd21af (diff)
downloadcpython-2cb176f3279060a55b650a826ccfe9db538d3cc5.zip
cpython-2cb176f3279060a55b650a826ccfe9db538d3cc5.tar.gz
cpython-2cb176f3279060a55b650a826ccfe9db538d3cc5.tar.bz2
Correct docstring about return value when group didn't participate in match
(pointed out by /F)
-rw-r--r--Lib/pre.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pre.py b/Lib/pre.py
index 3086bd4..9dedb9c 100644
--- a/Lib/pre.py
+++ b/Lib/pre.py
@@ -526,7 +526,7 @@ class MatchObject:
Return the index of the start of the substring matched by
group; group defaults to zero (meaning the whole matched
- substring). Return None if group exists but did not contribute
+ substring). Return -1 if group exists but did not contribute
to the match.
"""
@@ -542,7 +542,7 @@ class MatchObject:
Return the indices of the end of the substring matched by
group; group defaults to zero (meaning the whole matched
- substring). Return None if group exists but did not contribute
+ substring). Return -1 if group exists but did not contribute
to the match.
"""
@@ -557,8 +557,8 @@ class MatchObject:
"""span([group=0]) -> tuple
Return the 2-tuple (m.start(group), m.end(group)). Note that
- if group did not contribute to the match, this is (None,
- None). Group defaults to zero (meaning the whole matched
+ if group did not contribute to the match, this is (-1,
+ -1). Group defaults to zero (meaning the whole matched
substring).
"""