[pypy-svn] r62289 - in pypy/trunk/pypy: doc/config objspace/std
afa at codespeak.net
afa at codespeak.net
Sun Mar 1 14:29:35 CET 2009
Author: afa
Date: Sun Mar 1 14:29:34 2009
New Revision: 62289
Added:
pypy/trunk/pypy/doc/config/objspace.std.immutable_builtintypes.txt
Modified:
pypy/trunk/pypy/objspace/std/typeobject.py
Log:
Fix translation, broken since r62139.
Also add a minimal description of the new option.
Added: pypy/trunk/pypy/doc/config/objspace.std.immutable_builtintypes.txt
==============================================================================
--- (empty file)
+++ pypy/trunk/pypy/doc/config/objspace.std.immutable_builtintypes.txt Sun Mar 1 14:29:34 2009
@@ -0,0 +1 @@
+Disallow modification of builtin types. Enabled by default.
Modified: pypy/trunk/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/typeobject.py (original)
+++ pypy/trunk/pypy/objspace/std/typeobject.py Sun Mar 1 14:29:34 2009
@@ -650,6 +650,7 @@
return
if (space.config.objspace.std.immutable_builtintypes
and not w_type.is_heaptype()):
+ msg = "can't delete attributes on type object '%s'" %(w_type.name,)
raise OperationError(space.w_TypeError, space.wrap(msg))
try:
del w_type.dict_w[name]
More information about the Pypy-commit
mailing list