[Python-checkins] peps: Rename run() -> run_forever(), and explain why.
guido.van.rossum
python-checkins at python.org
Thu Apr 25 01:59:46 CEST 2013
http://hg.python.org/peps/rev/0b8251cdfbac
changeset: 4856:0b8251cdfbac
user: Guido van Rossum <guido at python.org>
date: Wed Apr 24 16:59:39 2013 -0700
summary:
Rename run() -> run_forever(), and explain why.
files:
pep-3156.txt | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pep-3156.txt b/pep-3156.txt
--- a/pep-3156.txt
+++ b/pep-3156.txt
@@ -207,8 +207,13 @@
A conforming event loop object has the following methods:
-- ``run()``. Runs the event loop until ``stop()`` is called. This
- cannot be called when the event loop is already running.
+- ``run_forever()``. Runs the event loop until ``stop()`` is called.
+ This cannot be called when the event loop is already running. (This
+ has a long name in part to avoid confusion with earlier versions of
+ this PEP, where ``run()`` had different behavior, in part because
+ there are already too many APIs that have a method named ``run()``,
+ and in part because there shouldn't be many places where this is
+ called anyway.
- ``run_until_complete(future, timeout=None)``. Runs the event loop
until the Future is done. If a timeout is given, it waits at most
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list