From 5644b7fad1f354f43b3dd4ae890edcade2c0bcbc Mon Sep 17 00:00:00 2001 From: Fredrik Lundh Date: Thu, 21 Sep 2000 17:03:25 +0000 Subject: - fixed yet another gcc -pedantic warning - added experimental "expand" method to match objects - don't use the buffer interface on unicode strings --- Lib/sre.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/sre.py') diff --git a/Lib/sre.py b/Lib/sre.py index b1ed9fbcfa..6dea5c4045 100644 --- a/Lib/sre.py +++ b/Lib/sre.py @@ -105,6 +105,11 @@ def _compile(*key): _cache[key] = p return p +def _expand(pattern, match, template): + # internal: match.expand implementation hook + template = sre_parse.parse_template(template, pattern) + return sre_parse.expand_template(template, match) + def _sub(pattern, template, string, count=0): # internal: pattern.sub implementation hook return _subn(pattern, template, string, count)[0] -- cgit v1.2.1