On 25 April 2015 at 17:43, Alan Gauld <alan.ga...@btinternet.com> wrote:
> know what's going on. I seem to recall you are using Python 3, > is that correct? > > I guess I should specify from now on py3 on win xp 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? >>> a, *b = 'good', 'bad', 'ugly' >>> a 'good' >>> b ['bad', 'ugly'] >>> a, *b = 'ham', 'eggs', 'spam' >>> a 'ham' >>> b ['eggs', 'spam'] >>> *b = 'eggs', 'spam' SyntaxError: starred assignment target must be in a list or tuple >>> -- Jim If you only had one hour left to live, would you spend it on Facebook, Twitter, or Google Plus? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor