
Jan. 9, 2016
8:57 a.m.
On 09.01.16 09:43, Nick Coghlan wrote:
If we followed the same reasoning for Victor's proposal, then a suitable attribute name would be "__cache_token__".
LGTM.
This also can be used for better detecting dict mutating during iterating: https://bugs.python.org/issue19332.
I initially thought the same thing, but the cache token will be updated even if the keys all stay the same, and one of the values is modified, while the mutation-during-iteration check is aimed at detecting changes to the keys, rather than the values.
This makes Raymond's objections even more strong.