summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-eventloops.rst
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2015-11-02 17:16:37 (GMT)
committerGuido van Rossum <guido@python.org>2015-11-02 17:16:37 (GMT)
commit26825bcb8da9dd1669fc1f4e698bd0454c78063c (patch)
tree3c0555d0519a663b8e8f2ca2ddbcf8ac75bfe62c /Doc/library/asyncio-eventloops.rst
parentf51d715845dfede2803ef7a2e6ea4e2a03f18486 (diff)
parent8778c6b77e52d1ebc1925a0c221de062bec30edf (diff)
downloadcpython-26825bcb8da9dd1669fc1f4e698bd0454c78063c.zip
cpython-26825bcb8da9dd1669fc1f4e698bd0454c78063c.tar.gz
cpython-26825bcb8da9dd1669fc1f4e698bd0454c78063c.tar.bz2
Use sys.platform instead of os.name to detect Windows in asyncio docs. Patch by Akira Li. (Merge 3.4->3.5)
Diffstat (limited to 'Doc/library/asyncio-eventloops.rst')
-rw-r--r--Doc/library/asyncio-eventloops.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/library/asyncio-eventloops.rst b/Doc/library/asyncio-eventloops.rst
index ae3bf90..b2e7d7c 100644
--- a/Doc/library/asyncio-eventloops.rst
+++ b/Doc/library/asyncio-eventloops.rst
@@ -57,9 +57,9 @@ asyncio currently provides two implementations of event loops:
Example to use a :class:`ProactorEventLoop` on Windows::
- import asyncio, os
+ import asyncio, sys
- if os.name == 'nt':
+ if sys.platform == 'win32':
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)
@@ -198,4 +198,3 @@ Access to the global loop policy
Set the current event loop policy. If *policy* is ``None``, the default
policy is restored.
-