This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients georg.brandl, gvanrossum, serhiy.storchaka, wim.glenn
Date 2019-05-01.09:23:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556702590.11.0.000567590970172.issue36761@roundup.psfhosted.org>
In-reply-to
Content
For the second case, you can use

a, *L[::2] = "abc"

For the first case this does not work, because an assignment can have only one starred expression.

Making the first case to work as you expected is breaking change. Currently

L[:], *rest = 'abcdef'

sets L to ['a'] and rest to ['b', 'c', 'd', 'e', 'f']. Consistent implementing of your idea would set L to ['a', 'b', 'c'] and rest to ['d', 'e', 'f'] (because len(L[:]) == 3 before assignment).

What is your use case? Why do you need such syntax?
History
Date User Action Args
2019-05-01 09:23:10serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, georg.brandl, wim.glenn
2019-05-01 09:23:10serhiy.storchakasetmessageid: <1556702590.11.0.000567590970172.issue36761@roundup.psfhosted.org>
2019-05-01 09:23:10serhiy.storchakalinkissue36761 messages
2019-05-01 09:23:09serhiy.storchakacreate