/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Dict Unpacking in Python
(github.com)
105 points
_ZeD_
| 1 comments |
08 Jul 25 16:05 UTC
|
HN request time: 0.211s
|
source
Show context
andy99
◴[
12 Jul 25 00:29 UTC
]
No.
44538191
[source]
▶
>>44501287 (OP)
#
def u(**kwargs): return tuple(kwargs.values())
Am I missing something, is this effectively the same?
*I realize the tuple can be omitted here
replies(4):
>>44538290
#
>>44538355
#
>>44539536
#
>>44539641
#
1.
masklinn
◴[
12 Jul 25 05:48 UTC
]
No.
44539641
[source]
▶
>>44538191
#
TFA looks things up by key, and allows pulling a subset of the dict.
ID:
GO
↑