[pypy-commit] pypy default: Baaah. Fought for a while before realizing that it was because
arigo
noreply at buildbot.pypy.org
Sat Oct 15 14:43:55 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r48071:1f3d56c3352f
Date: 2011-10-15 14:04 +0200
http://bitbucket.org/pypy/pypy/changeset/1f3d56c3352f/
Log: Baaah. Fought for a while before realizing that it was because I
mistakenly wrote "_immutable_ = ['field']". Grr. Should not occur
again with this extra check.
diff --git a/pypy/rpython/rclass.py b/pypy/rpython/rclass.py
--- a/pypy/rpython/rclass.py
+++ b/pypy/rpython/rclass.py
@@ -191,6 +191,10 @@
"class %r inherits from its parent _immutable_=True, "
"so it should also declare _immutable_=True" % (
self.classdef,))
+ if loc.classdict.get('_immutable_').value is not True:
+ raise TyperError(
+ "class %r: _immutable_ = something else than True" % (
+ self.classdef,))
hints = hints.copy()
hints['immutable'] = True
self.immutable_field_set = set() # unless overwritten below
More information about the pypy-commit
mailing list