PEP 509: be more explicit on when the version is incremented or not
This commit is contained in:
parent
04b7e969a2
commit
a19233d285
|
@ -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::
|
||||
|
||||
|
|
Loading…
Reference in New Issue