[Python-ideas] Support other dict types for type.__dict__
Ned Batchelder
ned at nedbatchelder.com
Sat Feb 25 14:17:58 CET 2012
On 2/24/2012 9:29 PM, Victor Stinner wrote:
> Hum, after thinking twice, using a "frozendict" for type.__dict__ is
> maybe overkill for my needs (and intrused as noticed Nick). Attached
> patch for Python 3.3 is a simpler approach: add __final__ special
> value for class. If this variable is present, the type is constant.
The Python answer for people who want read-only data structures has
always been, "Don't modify them if you don't want to, and write docs
that tell other people not to as well." What are you building that this
answer isn't good enough?
--Ned.
More information about the Python-ideas
mailing list