Message341183
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? |
|
Date |
User |
Action |
Args |
2019-05-01 09:23:10 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, georg.brandl, wim.glenn |
2019-05-01 09:23:10 | serhiy.storchaka | set | messageid: <1556702590.11.0.000567590970172.issue36761@roundup.psfhosted.org> |
2019-05-01 09:23:10 | serhiy.storchaka | link | issue36761 messages |
2019-05-01 09:23:09 | serhiy.storchaka | create | |
|