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: >> https://ep2012.europython.eu/**media/conference/slides/5-** > years-of-bad-ideas.pdf<https://ep2012.europython.eu/media/conference/slides/5-years-of-bad-ideas.pdf> >> 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 > accidental. >> Regards, > -- > Simon Sapin > ______________________________**_________________ > Python-ideas mailing list > Python-ideas at python.org > http://mail.python.org/**mailman/listinfo/python-ideas<http://mail.python.org/mailman/listinfo/python-ideas> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120226/ee2fbb69/attachment.html>