Name unpacking operator


(Gilvan Reis) #1

I was reading PEP 448 and in specification paragraph (https://www.python.org/dev/peps/pep-0448/#specification) it says

Dictionaries require ** unpacking; all the others require * unpacking.

I would like to suggest to name the * unpacking to single unpacking and the ** unpacking to double unpacking. What do you think about this change?


(Brett Cannon) #2

The term “double unpacking” doesn’t explain to me what is actually going on as you’re not duplicating something, you’re just unpacking a key: value pair.

I’ve honestly not found explaining this complicated enough to need to come up with new terminology.