diff options
author | Guido van Rossum <guido@python.org> | 1992-04-06 14:03:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-04-06 14:03:53 (GMT) |
commit | 6a1f08942002a7b55689e714460057e929788ad2 (patch) | |
tree | 836a6baeaddcc6225a14f7beebd1e54c361398ce | |
parent | b59cdd43562b6713fcf1227067ddde77a3868ac8 (diff) | |
download | cpython-6a1f08942002a7b55689e714460057e929788ad2.zip cpython-6a1f08942002a7b55689e714460057e929788ad2.tar.gz cpython-6a1f08942002a7b55689e714460057e929788ad2.tar.bz2 |
Use *args syntax instead of +args
-rw-r--r-- | Lib/grep.py | 6 | ||||
-rw-r--r-- | Lib/lib-old/grep.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/grep.py b/Lib/grep.py index 019d916..f466651 100644 --- a/Lib/grep.py +++ b/Lib/grep.py @@ -8,13 +8,13 @@ opt_show_where = 0 opt_show_filename = 0 opt_show_lineno = 1 -def grep(pat, +files): +def grep(pat, *files): return ggrep(RE_SYNTAX_GREP, pat, files) -def egrep(pat, +files): +def egrep(pat, *files): return ggrep(RE_SYNTAX_EGREP, pat, files) -def emgrep(pat, +files): +def emgrep(pat, *files): return ggrep(RE_SYNTAX_EMACS, pat, files) def ggrep(syntax, pat, files): diff --git a/Lib/lib-old/grep.py b/Lib/lib-old/grep.py index 019d916..f466651 100644 --- a/Lib/lib-old/grep.py +++ b/Lib/lib-old/grep.py @@ -8,13 +8,13 @@ opt_show_where = 0 opt_show_filename = 0 opt_show_lineno = 1 -def grep(pat, +files): +def grep(pat, *files): return ggrep(RE_SYNTAX_GREP, pat, files) -def egrep(pat, +files): +def egrep(pat, *files): return ggrep(RE_SYNTAX_EGREP, pat, files) -def emgrep(pat, +files): +def emgrep(pat, *files): return ggrep(RE_SYNTAX_EMACS, pat, files) def ggrep(syntax, pat, files): |