Re: [Python-Dev] PEP 509: Add a private version to dict (version 3)

2016-04-20 Thread Victor Stinner
Hi, Guido van Rossum and Jim J. Jewett suggested me to *not require* to always increase the dict version if a dict method does not modify its content. I modified the Changes section to only require that the version is increased when the dictionary content is modified. I also explained the nice si

Re: [Python-Dev] PEP 509: Add a private version to dict (version 3)

2016-04-19 Thread Victor Stinner
Hi, > Backwards Compatibility > === > > Since the ``PyDictObject`` structure is not part of the stable ABI and > the new dictionary version not exposed at the Python scope, changes are > backward compatible. My current implementation inserts the new ma_version_tag field in the

[Python-Dev] PEP 509: Add a private version to dict (version 3)

2016-04-19 Thread Victor Stinner
Hi, Below if the third version of my PEP 509 (dict version). Changes since the version 2: * __setitem__() and update() now always increases the version: remove the micro-optimization on "dict[key] is new_value". Exception: version is not changed with dict.update() is called without argument. * b