converting from perl: variable sized unpack

Tim Hammerquist tim at vegeta.ath.cx
Mon Jul 16 00:41:13 EDT 2001


Me parece que Quinn Dunkan <quinn at hork.ugcs.caltech.edu> dijo:
> On Mon, 16 Jul 2001 01:03:29 GMT, Tim Hammerquist <tim at vegeta.ath.cx> wrote:
> >I'm relatively new to Python. What's the '1.6 * apply' trick?
> 
> As of python 1.6,
> 
> f(x, *y, **z)
> 
> is shorthand for
> 
> apply(f, (x,), y, z)

Thanks!  I can see how that could come in handy.  I can think of several
occasions in my own coding that it would've helped, but it wasn't
anything I couldn't work around.

-- 
Just because my fingers are in my ears doesn't mean I'm ignoring you.
    -- Larry Wall



More information about the Python-list mailing list