[Python-ideas] Support other dict types for type.__dict__
aquavitae69 at gmail.com
Sun Feb 26 20:02:21 CET 2012
My point exactly!
On Feb 26, 2012 6:51 PM, "Simon Sapin" <simon.sapin at kozea.fr> wrote:
> Le 26/02/2012 14:56, Victor Stinner a écrit :
>> type.__setattr__(Three, 'value', 4) changes the value.
> Then there is the question of how much craziness you want to protect from.
> Nothing is ever truly private or immutable in CPython, given enough
> motivation and ctypes.
> See for example Armin Ronacher’s "Bad Ideas" presentation, especially the
> "Interpreter Warfare" part near the end:
> I think that the code patching tracebacks is in production in Jinja2. I’m
> sure frozensets could be modified in a similar way.
> The point is: immutable data types protect against mistakes more than
> someone truly determined to break the rules. With that in mind, I think
> that having to go through __setattr__ is good enough to make sure it’s not
> Simon Sapin
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas