
Hi, FYI I updated the implementation of the PEP 509: https://bugs.python.org/issue26058 2016-04-15 11:01 GMT+02:00 Antoine Pitrou <antoine@python.org>:
Why do this? It's a nice property that two dicts always have different version tags, and now you're killing this property for... no obvious reason?
Do you really think dict.clear() is in need of micro-optimizing a couple CPU cycles away?
So, I played with Armin's idea. I confirm that it works for my use case, guards on dict keys. It should also work on Yury's use case. Antoine is right, it's really a micro-optimization. It shouldn't help much for the integer overflow (which is not a real issue in practice). I propose to leave the PEP unchanged to keep the nice property of unique identifier for empty dictionaries. It can help for future use cases. Victor