mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Remove apply()
This commit is contained in:
parent
fe55464f39
commit
d91085598f
56 changed files with 179 additions and 285 deletions
|
|
@ -194,7 +194,7 @@ def main():
|
|||
if o == '-l':
|
||||
addn_link.append(a)
|
||||
if o == '-a':
|
||||
apply(modulefinder.AddPackagePath, tuple(a.split("=", 2)))
|
||||
modulefinder.AddPackagePath(*a.split("=", 2))
|
||||
if o == '-r':
|
||||
f,r = a.split("=", 2)
|
||||
replace_paths.append( (f,r) )
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ def askcolor(color = None, **options):
|
|||
"""Ask for a color"""
|
||||
global _chooser
|
||||
if not _chooser:
|
||||
_chooser = apply(Chooser, (), options)
|
||||
_chooser = Chooser(**options)
|
||||
return _chooser.show(color, options)
|
||||
|
||||
def save():
|
||||
|
|
|
|||
|
|
@ -399,6 +399,6 @@ if __name__ == '__main__':
|
|||
|
||||
import sys
|
||||
if 1:
|
||||
apply(convertdir,tuple(sys.argv[1:]))
|
||||
convertdir(*sys.argv[1:])
|
||||
else:
|
||||
apply(rewritepythondir,tuple(sys.argv[1:]))
|
||||
rewritepythondir(*sys.argv[1:])
|
||||
|
|
|
|||
|
|
@ -684,7 +684,7 @@ class Page:
|
|||
|
||||
def note(self, level, msg, *args):
|
||||
if self.checker:
|
||||
apply(self.checker.note, (level, msg) + args)
|
||||
self.checker.note(level, msg, *args)
|
||||
else:
|
||||
if self.verbose >= level:
|
||||
if args:
|
||||
|
|
@ -741,7 +741,7 @@ class MyURLopener(urllib.FancyURLopener):
|
|||
|
||||
def __init__(*args):
|
||||
self = args[0]
|
||||
apply(urllib.FancyURLopener.__init__, args)
|
||||
urllib.FancyURLopener.__init__(*args)
|
||||
self.addheaders = [
|
||||
('User-agent', 'Python-webchecker/%s' % __version__),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue