Author: Armin Rigo <ar...@tunes.org> Branch: mapdict-interp Changeset: r44254:e3248082e8ef Date: 2011-05-17 17:26 +0200 http://bitbucket.org/pypy/pypy/changeset/e3248082e8ef/
Log: Add a comment. diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py --- a/pypy/objspace/std/mapdict.py +++ b/pypy/objspace/std/mapdict.py @@ -807,6 +807,11 @@ map = w_obj._get_mapdict_map() if map is None or isinstance(map.terminator, DevolvedDictTerminator): return + # We know here that w_obj.getdictvalue(space, name) just returned None, + # so the 'name' is not in the instance. We repeat the lookup to find it + # in the class, this time taking care of the result: it can be either a + # quasi-constant class attribute, or actually a TypeCell --- which we + # must not cache. (It should not be None here, but you never know...) assert space.config.objspace.std.withmethodcache _, w_method = w_type._pure_lookup_where_with_method_cache(name, version_tag) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit