/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
A “frozen” dictionary for Python
(lwn.net)
191 points
jwilk
| 1 comments |
11 Dec 25 09:51 UTC
|
HN request time: 0.193s
|
source
Show context
codethief
◴[
11 Dec 25 11:17 UTC
]
No.
46230017
[source]
▶
>>46229467 (OP)
#
Next step: Auto-inferring the correct (most narrow) TypedDict type from a frozendict. (Think `const foo = { … } as const` in TypeScript.) I miss this TS feature in Python on the daily.
replies(5):
>>46230085
#
>>46230120
#
>>46230296
#
>>46230354
#
>>46230695
#
1.
adzm
◴[
11 Dec 25 11:56 UTC
]
No.
46230296
[source]
▶
>>46230017
#
Curious what this means for typescript as well; honestly I've only reached for as const rarely.
ID:
GO
↑