diff --git a/pep-0511.txt b/pep-0511.txt index 44faf4080..4a0766139 100644 --- a/pep-0511.txt +++ b/pep-0511.txt @@ -277,6 +277,19 @@ Prototype:: Parameters: * *code*: code object +* *context*: an object with an *optimize* attribute (``int``), the optimization + level (0, 1 or 2). The value of the *optimize* attribute comes from the + *optimize* parameter of the ``compile()`` function, it is equal to + ``sys.flags.optimize`` by default. + +Each implementation of Python can add extra attributes to *context*. For +example, on CPython, *context* will also have the following attribute: + +* *interactive* (``bool``): true if in interactive mode + +XXX add more flags? + +XXX replace flags int with a sub-namespace, or with specific attributes? The method must return a code object.