On Fri, Sep 9, 2011 at 9:04 PM, Peter Otten <__pete...@web.de> wrote: >>>> [x] = "" > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ValueError: need more than 0 values to unpack >>>> [x] = "a" >>>> [x] = "ab" > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ValueError: too many values to unpack >
Hey look, it's a new operator - the "assign-sole-result-of-iterable" operator! x ,= "a" :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list