[Tutor] REPL format

Steven D'Aprano steve at pearwood.info
Sun Apr 26 14:05:28 CEST 2015


On Sun, Apr 26, 2015 at 12:57:57PM +0100, Alan Gauld wrote:
> On 26/04/15 02:28, Jim Mooney wrote:
> 
> >Another question - why does the first assignment work but not the second. I
> >can see it's a syntax error but if Py can unpack in the first case why
> >can't it unpack the same thing in the second?
> 
> I'm not sure what you expect it to unpack. Its already a variable 
> pointing at a tuple without the *. What do you expect the * to do?

Well, it could unpack the values of the right and re-pack them on the 
left, except that would be a waste of time and effort :-)


-- 
Steve


More information about the Tutor mailing list