3 ms·
The fact that they are definitionally ordered does not really matter for this discussion: for all intents and purposes of this proposal, they are unordered (ins
by necovek 3y ago
The fact that they are definitionally ordered does not really matter for this discussion: for all intents and purposes of this proposal, they are unordered (insertion order is pretty much arbitrary order when it comes to their use as positional arguments or kwargs). And my intent was a bit more specific: I was thinking of "sorted", so definitely my bad.
For the proposed use case, either **kwargs would have to sort a subset of the dict with integer keys to map positional arguments to their, ahem, positions, and then either leave the rest as-is (or sort it altogether), or a dict would have its definition modified to keep this order as items are added.
I dislike both, and I definitely hate implicit sorting happening with **.