Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8778c6b7
Commit
8778c6b7
authored
Nov 02, 2015
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use sys.platform instead of os.name to detect Windows in asyncio docs. Patch by Akira Li.
parent
d65c9496
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
Doc/library/asyncio-eventloops.rst
Doc/library/asyncio-eventloops.rst
+2
-3
Doc/library/asyncio-subprocess.rst
Doc/library/asyncio-subprocess.rst
+2
-2
No files found.
Doc/library/asyncio-eventloops.rst
View file @
8778c6b7
...
...
@@ -57,9 +57,9 @@ asyncio currently provides two implementations of event loops:
Example to use a :class:`ProactorEventLoop` on Windows::
import asyncio,
o
s
import asyncio,
sy
s
if
os.name == 'nt
':
if
sys.platform == 'win32
':
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)
...
...
@@ -196,4 +196,3 @@ Access to the global loop policy
Set the current event loop policy. If *policy* is ``None``, the default
policy is restored.
Doc/library/asyncio-subprocess.rst
View file @
8778c6b7
...
...
@@ -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,
o
s
import asyncio,
sy
s
if
os.name == 'nt
':
if
sys.platform == 'win32
':
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment