From 2cb176f3279060a55b650a826ccfe9db538d3cc5 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 4 Sep 2000 03:19:48 +0000 Subject: [PATCH] Correct docstring about return value when group didn't participate in match (pointed out by /F) --- Lib/pre.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/pre.py b/Lib/pre.py index 3086bd45468..9dedb9c79cf 100644 --- a/Lib/pre.py +++ b/Lib/pre.py @@ -526,7 +526,7 @@ def start(self, g = 0): 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 @@ def end(self, g = 0): 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 @@ def span(self, g = 0): """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). """