From a19233d2853268af1f4943f199bed0739c869e7d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 12 Jan 2016 00:19:28 +0100 Subject: [PATCH] PEP 509: be more explicit on when the version is incremented or not --- pep-0509.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pep-0509.txt b/pep-0509.txt index 84bf6118e..76ceea88e 100644 --- a/pep-0509.txt +++ b/pep-0509.txt @@ -153,9 +153,10 @@ initilized to version ``0``. The version is incremented at each change: * ``setdefault(key, value)`` if the `key` does not exist * ``__detitem__(key)`` if the key exists * ``__setitem__(key, value)`` if the `key` doesn't exist or if the value - is different -* ``update(...)`` if new values are different than existing values (the - version can be incremented multiple times) + is not ``dict[key]`` +* ``update(...)`` if new values are different than existing values: + values are compared by identity, not by their content; the version can + be incremented multiple times Example using an hypothetical ``dict_get_version(dict)`` function::