summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/asyncio-eventloops.rst5
-rw-r--r--Doc/library/asyncio-subprocess.rst4
2 files changed, 4 insertions, 5 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.
-
diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst
index c0704cd..21dae54 100644
--- a/Doc/library/asyncio-subprocess.rst
+++ b/Doc/library/asyncio-subprocess.rst
@@ -12,9 +12,9 @@ On Windows, the default event loop is :class:`SelectorEventLoop` which does not
support subprocesses. :class:`ProactorEventLoop` should be used instead.
Example to use it on Windows::
- import asyncio, os
+ import asyncio, sys
- if os.name == 'nt':
+ if sys.platform == 'win32':
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)