STINNER Victor <victor.stin...@gmail.com> added the comment: 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. ---------- Added file: http://bugs.python.org/file24696/type_final.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14162> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com