Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r81813:47796d1c4e17 Date: 2016-01-15 17:48 +0100 http://bitbucket.org/pypy/pypy/changeset/47796d1c4e17/
Log: Add slots here, to make sure that nobody is using "self.storage" any longer diff --git a/pypy/objspace/std/dictmultiobject.py b/pypy/objspace/std/dictmultiobject.py --- a/pypy/objspace/std/dictmultiobject.py +++ b/pypy/objspace/std/dictmultiobject.py @@ -43,6 +43,8 @@ class W_DictMultiObject(W_Root): """ Abstract base class that does not store a strategy. """ + __slots__ = ['space', 'dstorage'] + def get_strategy(self): raise NotImplementedError("abstract method") @@ -351,6 +353,8 @@ class W_DictObject(W_DictMultiObject): """ a regular dict object """ + __slots__ = ['dstrategy'] + def __init__(self, space, strategy, storage): W_DictMultiObject.__init__(self, space, storage) self.dstrategy = strategy @@ -365,6 +369,7 @@ class W_ModuleDictObject(W_DictMultiObject): """ a dict object for a module, that is not expected to change. It stores the strategy as a quasi-immutable field. """ + __slots__ = ['mstrategy'] _immutable_fields_ = ['mstrategy?'] def __init__(self, space, strategy, storage): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit