|
@1st1 | |||||
|
New PEP: python.org/dev/peps/pep-0… —Adding a frozenmap type to collections.
|
||||||
|
||||||
|
Yury Selivanov
@1st1
|
12. ruj |
|
If it's accepted I'll be looking for someone to mentor to help with the implementation! :)
|
||
|
|
||
|
Rémy
@Xowap
|
15. ruj |
|
idea: frozenmap(collection, **kwargs)
Creates a copy while patching it with kwargs
|
||
|
|
||
|
Yury Selivanov
@1st1
|
15. ruj |
|
Yeah, that's in the pep :) Although I'm not sure if the reference implementation has a fast path if the collection arg is already a frozenmap.
|
||
|
|
||
|
Vsevolod Solovyov
@murkt
|
13. ruj |
|
I wonder if will be useful to include frozensets and frozenmaps directly into Python syntax using something like `f{}` (like strings have prefixes f, r, u). Then we would have frozenmap-comprehensions, easier construction with things like `f{**input1, **input2, key: value}`, etc.
|
||
|
|
||
|
Yury Selivanov
@1st1
|
13. ruj |
|
I don't see something like that to be accepted until everybody is using frozendicts everywhere. :/
|
||
|
|
||
|
G
@rugleb
|
13. ruj |
|
Looks amazing, will wait
|
||
|
|
||