On Apr 8, 2014 10:31 AM, "MRAB" <pyt...@mrabarnett.plus.com> wrote:
> If the RHS yields too few, e.g. 3, you'll get:
>
> ValueError: attempt to assign sequence of size 3 to extended slice of size 4
>
> If it yields too many, e.g. 10, you'll get:
>
> ValueError: attempt to assign sequence of size 10 to extended slice of size 4
[snip]
> The fix would be to complain of raise StopIteration doesn't occur after
> N+1 yields, where N is the number of values needed by the LHS.

Perhaps N+2 would be better:

  raise RuntimeError('{} is right out'.format(n+2))

-eric
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to