[Python-checkins] peps: Instead of init_event_loop(), define new_event_loop().
guido.van.rossum
python-checkins at python.org
Wed Jan 9 18:18:57 CET 2013
http://hg.python.org/peps/rev/2eca3f5be871
changeset: 4660:2eca3f5be871
user: Guido van Rossum <guido at python.org>
date: Tue Jan 08 15:45:25 2013 -0800
summary:
Instead of init_event_loop(), define new_event_loop().
files:
pep-3156.txt | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pep-3156.txt b/pep-3156.txt
--- a/pep-3156.txt
+++ b/pep-3156.txt
@@ -126,16 +126,16 @@
``get_event_loop()``.
For the benefit of unit tests and other special cases there's a third
-policy function: ``init_event_loop()``, which creates a new EventLoop
-instance and calls ``set_event_loop()`` with it. TBD: Maybe we should
-have a ``create_default_event_loop_instance()`` function instead?
+policy function: ``new_event_loop()``, which creates and returns a new
+EventLoop instance according to the policy's default rules. To make
+this the current event loop, you must call ``set_event_loop()``.
To change the way the above three functions work
(including their notion of context), call
``set_event_loop_policy(policy)``, where ``policy`` is an event loop
policy object. The policy object can be any object that has methods
``get_event_loop()``, ``set_event_loop(event_loop)``
-and ``init_event_loop()`` behaving like
+and ``new_event_loop()`` behaving like
the functions described above. The default event loop policy is an
instance of the class ``DefaultEventLoopPolicy``. The current event loop
policy object can be retrieved by calling ``get_event_loop_policy()``.
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list