Twitter | Pretraživanje | |
Yury Selivanov
New PEP: —Adding a frozenmap type to collections.
The official home of the Python Programming Language
Reply Retweet Označi sa "sviđa mi se" More
Yury Selivanov 12. ruj
Odgovor korisniku/ci @1st1
If it's accepted I'll be looking for someone to mentor to help with the implementation! :)
Reply Retweet Označi sa "sviđa mi se"
Rémy 15. ruj
Odgovor korisniku/ci @1st1
idea: frozenmap(collection, **kwargs) Creates a copy while patching it with kwargs
Reply Retweet Označi sa "sviđa mi se"
Yury Selivanov 15. ruj
Odgovor korisniku/ci @Xowap
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.
Reply Retweet Označi sa "sviđa mi se"
Vsevolod Solovyov 13. ruj
Odgovor korisniku/ci @1st1 @andrew_svetlov
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.
Reply Retweet Označi sa "sviđa mi se"
Yury Selivanov 13. ruj
Odgovor korisniku/ci @murkt @andrew_svetlov
I don't see something like that to be accepted until everybody is using frozendicts everywhere. :/
Reply Retweet Označi sa "sviđa mi se"
G 13. ruj
Odgovor korisniku/ci @1st1 @andrew_svetlov
Looks amazing, will wait
Reply Retweet Označi sa "sviđa mi se"