This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2012-03-01.12:58:31
SpamBayes Score 0.0047332644
Marked as misclassified No
Message-id <1330606713.64.0.241676886632.issue14162@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-01 12:58:33vstinnersetrecipients: + vstinner
2012-03-01 12:58:33vstinnersetmessageid: <1330606713.64.0.241676886632.issue14162@psf.upfronthosting.co.za>
2012-03-01 12:58:33vstinnerlinkissue14162 messages
2012-03-01 12:58:32vstinnercreate