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
|
* ``setdefault(key, value)`` if the `key` does not exist
|
||||||
* ``__detitem__(key)`` if the key exists
|
* ``__detitem__(key)`` if the key exists
|
||||||
* ``__setitem__(key, value)`` if the `key` doesn't exist or if the value
|
* ``__setitem__(key, value)`` if the `key` doesn't exist or if the value
|
||||||
is different
|
is not ``dict[key]``
|
||||||
* ``update(...)`` if new values are different than existing values (the
|
* ``update(...)`` if new values are different than existing values:
|
||||||
version can be incremented multiple times)
|
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::
|
Example using an hypothetical ``dict_get_version(dict)`` function::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue