* point to PEP 510 for static optimizers
* remove link to issue 19332, dict.__version__ doesn't help
This commit is contained in:
Victor Stinner 2016-01-11 00:28:46 +01:00
parent ee1a6bb292
commit 402cb74efe
1 changed files with 5 additions and 12 deletions

View File

@ -42,6 +42,11 @@ constant. This optimization requires a guard on the global variable to
check if it was modified. If the variable is modified, the variable must
be loaded at runtime, instead of using the constant.
See the `PEP 510 -- Specialized functions with guards
<https://www.python.org/dev/peps/pep-0510/>`_ for the concrete usage of
guards to specialize functions and for the rationale on Python static
optimizers.
Guard example
=============
@ -164,18 +169,6 @@ compared to the slow down of using a more complex type.
Usage of dict.__version__
=========================
Detect dictionary mutation during iteration
-------------------------------------------
Currently, iterating on a dictionary only detects when the dictionary
size changes, but not when keys or values are modified. Using the
dictionary version, it would be possible to detect when keys and values
are modified.
See the `issue #19332: Guard against changing dict during iteration
<https://bugs.python.org/issue19332>`_.
astoptimizer of FAT Python
--------------------------