Python style advice

Terry Reedy tjreedy at udel.edu
Tue Feb 10 10:18:14 EST 2004


"Nick Craig-Wood" <ncw at axis.demon.co.uk> wrote in message
news:slrnc2h9id.um.ncw at irishsea.home.craig-wood.com...
> >  def myfunc (a = None, b = None, c = None)

> >>> def f(a=None,b=None,c=None,*extra): print a,b,c
 ...
> >>> L=[]; apply(f,L)

You can now write 'apply(f,L)' as f(*L) and be future-proof in case apply
disappears

tjr







More information about the Python-list mailing list