diff options
author | Guido van Rossum <guido@python.org> | 1991-12-30 23:01:28 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-30 23:01:28 (GMT) |
commit | 9f39fbb5b7b2e5066c770a784294f6be70e6439a (patch) | |
tree | 1e98b00014febb3be0b27f27a9191a3e7a400ea0 /Tools/scripts | |
parent | 6c6b78d6bd4d19af78e61a6b08c84696a2a88fa5 (diff) | |
download | cpython-9f39fbb5b7b2e5066c770a784294f6be70e6439a.zip cpython-9f39fbb5b7b2e5066c770a784294f6be70e6439a.tar.gz cpython-9f39fbb5b7b2e5066c770a784294f6be70e6439a.tar.bz2 |
Adapt the regular expression to the new class syntax.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-x | Tools/scripts/eptags.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/scripts/eptags.py b/Tools/scripts/eptags.py index 1c682d3..db535af 100755 --- a/Tools/scripts/eptags.py +++ b/Tools/scripts/eptags.py @@ -18,7 +18,8 @@ def main(): for file in args: treat_file(file, outfp) -matcher = regexp.compile('^[ \t]*(def|class)[ \t]+([a-zA-Z0-9_]+)[ \t]*\(') +expr = '^[ \t]*(def|class)[ \t]+([a-zA-Z0-9_]+)[ \t]*[:(]' +matcher = regexp.compile(expr).match def treat_file(file, outfp): try: @@ -34,7 +35,7 @@ def treat_file(file, outfp): line = fp.readline() if not line: break lineno = lineno + 1 - res = matcher.exec(line) + res = matcher(line) if res: (a, b), (a1, b1), (a2, b2) = res name = line[a2:b2] |