Skip to content

Commit 9ae9d66

Browse files
author
Thomas Preud'homme
committed
[LNT] Python 3 support: get rid of apply builtin function
Replace calls to deprecated python2-specific apply builtin by direct function calls with explicit argument list unpacking. This was produced by running futurize's stage1 lib2to3.fixes.fix_apply. Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls Reviewed By: hubert.reinterpretcast Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D67806 llvm-svn: 372471
1 parent 848a12d commit 9ae9d66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lnt/external/stats/stats.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def __init__(self, *tuples):
254254
def __call__(self, arg1, *args, **kw):
255255
if type(arg1) not in self._dispatch:
256256
raise TypeError("don't know how to dispatch %s arguments" % type(arg1))
257-
return apply(self._dispatch[type(arg1)], (arg1,) + args, kw)
257+
return self._dispatch[type(arg1)](*((arg1,) + args), **kw)
258258

259259

260260
##########################################################################
@@ -1306,7 +1306,7 @@ def lfriedmanchisquare(*args):
13061306
if k < 3:
13071307
raise ValueError('Less than 3 levels. Friedman test not appropriate.')
13081308
n = len(args[0])
1309-
data = apply(pstat.abut,tuple(args))
1309+
data = pstat.abut(*tuple(args))
13101310
for i in range(len(data)):
13111311
data[i] = rankdata(data[i])
13121312
ssbn = 0
@@ -3687,7 +3687,7 @@ def afriedmanchisquare(*args):
36873687
if k < 3:
36883688
raise ValueError('\nLess than 3 levels. Friedman test not appropriate.\n')
36893689
n = len(args[0])
3690-
data = apply(pstat.aabut,args)
3690+
data = pstat.aabut(*args)
36913691
data = data.astype(N.float_)
36923692
for i in range(len(data)):
36933693
data[i] = arankdata(data[i])

0 commit comments

Comments
 (0)