Issue 14162: PEP 416: Add a builtin frozendict type (original) (raw)

Created on 2012-02-29 18:05 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
frozendict.patch vstinner,2012-02-29 18:15 review
frozendict_builtins.patch vstinner,2012-03-01 00:44 review
type_final.patch vstinner,2012-03-01 12:58 review
Messages (5)
msg154655 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2012-02-29 18:04
Patch to implement the PEP 416.
msg154656 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2012-02-29 18:20
There is no documentation update yet.
msg154670 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2012-03-01 00:44
frozendict_builtins.patch: make CPython supports frozendict for the __builtins__ mapping. It is an example of frozendict usage which helps my pysandbox project.
msg154690 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2012-03-01 12:58
Another frozendict usage example: freeze the dict of a new type if it contains __final__ in its namespace. Example: >>> class Classic: ... pass ... >>> Classic.attr=1 >>> class FinalizedType: ... __final__=True ... >>> FinalizedType.attr=1 (...) TypeError: 'frozendict' object does not support item assignment This patch is not part of the PEP 416 and is just a proof-of-concept.
msg156866 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2012-03-26 20:22
The PEP has been rejected. See issue #14386 for a new mappingview type.
History
Date User Action Args
2022-04-11 14:57:27 admin set github: 58370
2012-03-26 20:22:50 vstinner set status: open -> closedresolution: fixedmessages: +
2012-03-01 12:58:33 vstinner set files: + type_final.patchmessages: +
2012-03-01 00:44:26 vstinner set files: + frozendict_builtins.patchmessages: + title: Implementation of the PEP 416 (Add a builtin frozendict type) -> PEP 416: Add a builtin frozendict type
2012-02-29 18:20:02 vstinner set messages: +
2012-02-29 18:15:19 vstinner set files: + frozendict.patch
2012-02-29 18:08:42 vstinner set files: - frozendict.patch
2012-02-29 18:05:03 vstinner create