diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-09-21 17:03:25 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-09-21 17:03:25 (GMT) |
commit | 5644b7fad1f354f43b3dd4ae890edcade2c0bcbc (patch) | |
tree | c4d3f61dbdbc137f555b369ba973644c5b8fd7e8 /Lib/sre.py | |
parent | 44627016da509b2bc59c38d7bf0ba592fe56a7a3 (diff) | |
download | cpython-5644b7fad1f354f43b3dd4ae890edcade2c0bcbc.zip cpython-5644b7fad1f354f43b3dd4ae890edcade2c0bcbc.tar.gz cpython-5644b7fad1f354f43b3dd4ae890edcade2c0bcbc.tar.bz2 |
- fixed yet another gcc -pedantic warning
- added experimental "expand" method to match objects
- don't use the buffer interface on unicode strings
Diffstat (limited to 'Lib/sre.py')
-rw-r--r-- | Lib/sre.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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] |