Bill Allombert on Fri, 12 Oct 2012 10:53:52 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Multiple assignment


On Fri, Oct 12, 2012 at 08:30:47AM +0200, Dirk Laurie wrote:
> Is there a shorthand for e.g.
> 
> qr = divrem(a,b); q=qr[1]; r=qr[2];

Yes, but only in the development version:
[q,r] = divrem(a,b);

Cheers,
Bill.