From 6c032178b45956c4c87601c26a5ad4dbd1ee54b1 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Fri, 28 Dec 2012 01:10:05 +1000 Subject: [PATCH] Proofread before posting to python-ideas --- pep-0432.txt | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/pep-0432.txt b/pep-0432.txt index 461c32ad4..d01bbac0c 100644 --- a/pep-0432.txt +++ b/pep-0432.txt @@ -238,11 +238,12 @@ to be used safely for all of the remaining configuration steps (unlike the status quo). In addition, the current thread will possess a valid Python thread state, -allow any further configuration data to be stored. +allow any further configuration data to be stored on the interpreter object +rather than in C process globals. -Any call to Py_InitStart() must have a matching call to Py_Finalize(). It -is acceptable to skip calling Py_InitFinish() in between (e.g. if -attempting to read the configuration settings fails) +Any call to Py_BeginInitialization() must have a matching call to +Py_Finalize(). It is acceptable to skip calling Py_EndInitialization() in +between (e.g. if attempting to read the configuration settings fails) Determining the remaining configuration settings @@ -343,6 +344,11 @@ are currently read lazily may instead be read once during interpreter initialisation. As the PEP matures, these will be discussed in more detail on a case by case basis. +The Py_Initialize() style of initialisation will continue to be supported. It +will use the new API internally, but will continue to exhibit the same +behaviour as it does today, ensuring that sys.argv is not set until a +subsequent PySys_SetArgv call. + A System Python Executable ========================== @@ -364,14 +370,14 @@ sounds good in theory but proves to be problematic in practice. One final aspect not addressed by the general embedding changes above is the current inaccessibility of the core logic for deciding between the -different execution modes supported by CPython:: +different execution modes supported by CPython: - * script execution - * directory/zipfile execution - * command execution ("-c" switch) - * module or package execution ("-m" switch) - * execution from stdin (non-interactive) - * interactive stdin +* script execution +* directory/zipfile execution +* command execution ("-c" switch) +* module or package execution ("-m" switch) +* execution from stdin (non-interactive) +* interactive stdin