Use *args syntax instead of +args
This commit is contained in:
parent
b59cdd4356
commit
6a1f089420
|
@ -8,13 +8,13 @@ opt_show_where = 0
|
||||||
opt_show_filename = 0
|
opt_show_filename = 0
|
||||||
opt_show_lineno = 1
|
opt_show_lineno = 1
|
||||||
|
|
||||||
def grep(pat, +files):
|
def grep(pat, *files):
|
||||||
return ggrep(RE_SYNTAX_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)
|
return ggrep(RE_SYNTAX_EGREP, pat, files)
|
||||||
|
|
||||||
def emgrep(pat, +files):
|
def emgrep(pat, *files):
|
||||||
return ggrep(RE_SYNTAX_EMACS, pat, files)
|
return ggrep(RE_SYNTAX_EMACS, pat, files)
|
||||||
|
|
||||||
def ggrep(syntax, pat, files):
|
def ggrep(syntax, pat, files):
|
||||||
|
|
|
@ -8,13 +8,13 @@ opt_show_where = 0
|
||||||
opt_show_filename = 0
|
opt_show_filename = 0
|
||||||
opt_show_lineno = 1
|
opt_show_lineno = 1
|
||||||
|
|
||||||
def grep(pat, +files):
|
def grep(pat, *files):
|
||||||
return ggrep(RE_SYNTAX_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)
|
return ggrep(RE_SYNTAX_EGREP, pat, files)
|
||||||
|
|
||||||
def emgrep(pat, +files):
|
def emgrep(pat, *files):
|
||||||
return ggrep(RE_SYNTAX_EMACS, pat, files)
|
return ggrep(RE_SYNTAX_EMACS, pat, files)
|
||||||
|
|
||||||
def ggrep(syntax, pat, files):
|
def ggrep(syntax, pat, files):
|
||||||
|
|
Loading…
Reference in New Issue