Nick Coghlan added the comment:

As far as the specific 5 phase vs 2 steps goes, the two steps in PEP 432 terms 
are the "Pre-Initialized -> Initializing" transition and the "Initializing -> 
Initialized" transition.

What Gregory is talking about is a potentially good way to organise the second 
step - systemd in Linux is similarly organised around the idea of a directed 
acyclic graph of dependencies. For the initial implementation, we're unlikely 
to go that far though - we'll likely keep the existing initialisation code, and 
just rearrange the high level invocations.

The other phases in PEP 432 are due to the fact that "run __main__" is a 
separate step, distinct from interpreter initialisation. When you embed Python 
as the scripting engine in a larger application, the idea of having a __main__ 
module may not actually make any sense. In those cases, it will still be there 
(as the interpreter creates it automatically), it will just be empty. But for 
the CPython CLI, we need that extra "run main" step. (There's a strong case to 
be made for that being in a separate PEP, and I may still do that - this 
discussion is certainly pushing me in that direction)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22257>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to