Message154690
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. |
|
Date |
User |
Action |
Args |
2012-03-01 12:58:33 | vstinner | set | recipients:
+ vstinner |
2012-03-01 12:58:33 | vstinner | set | messageid: <1330606713.64.0.241676886632.issue14162@psf.upfronthosting.co.za> |
2012-03-01 12:58:33 | vstinner | link | issue14162 messages |
2012-03-01 12:58:32 | vstinner | create | |
|