Author serhiy.storchaka
Recipients benjamin.peterson, gvanrossum, mark.dickinson, serhiy.storchaka
Date 2018-08-28.16:42:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> It would need a special case so that `for x in *a, *b:` doesn't first construct a tuple of all elements in a and b. Thoughts?

It may be surprising that `for x in *a, *b:` behave differently from `for x in (*a, *b):`.

It is idiomatic to create a list of keys and iterate it if you want to modify the dict during iterating:

    for key in list(d):
        # modify d

This can be written in a form

    for key in [*d]:
        # modify d


    for key in (*d,):
        # modify d

(although the latter variant is slightly slower).
Date User Action Args
2018-08-28 16:42:08serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, mark.dickinson, benjamin.peterson
2018-08-28 16:42:08serhiy.storchakasetmessageid: <>
2018-08-28 16:42:08serhiy.storchakalinkissue34508 messages
2018-08-28 16:42:08serhiy.storchakacreate