Very simple request about argument setting.
fredrik at pythonware.com
Mon Oct 30 11:58:06 CET 2006
Hieu Hoang wrote:
> So, this command assigns 2 values (x and foo) to 3 variables (x, foo
> and bar), which raises that exception. I'm not sure why python says
> "need more than 2 values to unpack" not "need 3 values" though.
probably because if you look at the call site
it's more helpful to learn that "shuf" returned 2 values than to learn
that the code you're looking at requires three values.
More information about the Python-list