PEP 510: Resolve uses of the default role (#3398)
This commit is contained in:
parent
47b79e09fe
commit
96480c49e4
10
pep-0510.txt
10
pep-0510.txt
|
@ -125,11 +125,11 @@ Hypothetical myoptimizer module
|
||||||
Examples in this PEP uses a hypothetical ``myoptimizer`` module which
|
Examples in this PEP uses a hypothetical ``myoptimizer`` module which
|
||||||
provides the following functions and types:
|
provides the following functions and types:
|
||||||
|
|
||||||
* ``specialize(func, code, guards)``: add the specialized code `code`
|
* ``specialize(func, code, guards)``: add the specialized code ``code``
|
||||||
with guards `guards` to the function `func`
|
with guards ``guards`` to the function ``func``
|
||||||
* ``get_specialized(func)``: get the list of specialized codes as a list
|
* ``get_specialized(func)``: get the list of specialized codes as a list
|
||||||
of ``(code, guards)`` tuples where `code` is a callable or code object
|
of ``(code, guards)`` tuples where ``code`` is a callable or code object
|
||||||
and `guards` is a list of a guards
|
and ``guards`` is a list of a guards
|
||||||
* ``GuardBuiltins(name)``: guard watching for
|
* ``GuardBuiltins(name)``: guard watching for
|
||||||
``builtins.__dict__[name]`` and ``globals()[name]``. The guard fails
|
``builtins.__dict__[name]`` and ``globals()[name]``. The guard fails
|
||||||
if ``builtins.__dict__[name]`` is replaced, or if ``globals()[name]``
|
if ``builtins.__dict__[name]`` is replaced, or if ``globals()[name]``
|
||||||
|
@ -323,7 +323,7 @@ The ``check()`` function checks a guard:
|
||||||
*stack* is an array of arguments: indexed arguments followed by (*key*,
|
*stack* is an array of arguments: indexed arguments followed by (*key*,
|
||||||
*value*) pairs of keyword arguments. *na* is the number of indexed
|
*value*) pairs of keyword arguments. *na* is the number of indexed
|
||||||
arguments. *nk* is the number of keyword arguments: the number of (*key*,
|
arguments. *nk* is the number of keyword arguments: the number of (*key*,
|
||||||
*value*) pairs. `stack` contains ``na + nk * 2`` objects.
|
*value*) pairs. ``stack`` contains ``na + nk * 2`` objects.
|
||||||
|
|
||||||
|
|
||||||
Specialized code
|
Specialized code
|
||||||
|
|
Loading…
Reference in New Issue