On Thu, Jun 8, 2017 at 4:27 PM, Abe Dillon <abedil...@gmail.com> wrote:

> >>> a, *b = 1, 2, 3, 4, 5   # NOTE: Most itterables unpack starred
> variables as a list
> >>> type(b)
> <class 'list'>
>
> >>> a, *b = "except strings"
> >>> type(b)
> <class 'str'>
>

I was just playing around with this, and on Python 3.5.3, I see strings
unpacked as lists:

>>> first, *rest = 'spam'
>>> type(rest)
<class 'list'>

Am I doing something different, or is this something that changed in the
language?
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to