[Python-ideas] Support other dict types for type.__dict__
Victor Stinner
victor.stinner at haypocalc.com
Mon Feb 27 10:54:45 CET 2012
>> 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.
My pysandbox project uses various hacks to secure Python. The attacker
doesn't care of writing pythonic code, (s)he just want to break the
sandbox :-) See my pysandbox project for more information:
https://github.com/haypo/pysandbox/
See sandbox/test/ if you like weird code :-) Tests ensure that the
sandbox is safe.
Constant types would also help optimization, especially PyPy JIT.
Victor
More information about the Python-ideas
mailing list