MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
are
Recherche

[$] A "frozen" dictionary for Python

jeudi 4 décembre 2025, 15:42 , par LWN.net
Dictionaries are ubiquitous in Python code; they are the data structure of
choice for a wide variety of tasks. But dictionaries are mutable, which
makes them problematic for sharing data in concurrent code. Python has
added various concurrency features to the language over the last decade or
so—async, free threading without the global interpreter lock
(GIL), and independent subinterpreters—but users must work out their own
solution for an immutable dictionary that can be safely shared by
concurrent code. There are existing modules that could be used, but a recent proposal, PEP 814 ('Add frozendict
built-in type'), looks to bring the feature to the language itself.
https://lwn.net/Articles/1047238/

Voir aussi

News copyright owned by their original publishers | Copyright © 2004 - 2025 Zicos / 440Network
Date Actuelle
jeu. 4 déc. - 17:10 CET