Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docstrings for AbstractEventLoopPolicy
  • Loading branch information
vinmic
vinmic committed Jun 3, 2016
commit c1cb666d4ee5cc5be5cd4690e6e1ed5d5dc7e43a
12 changes: 3 additions & 9 deletions asyncio/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def get_default_loop(self):
raise NotImplementedError

def set_default_loop(self, loop):
"""Set the default event loop for the current context to loop."""
"""Set the default event loop for the current context."""
raise NotImplementedError

def get_running_loop(self):
Expand Down Expand Up @@ -563,20 +563,14 @@ def set_child_watcher(self, watcher):
# Non-abstract methods

def get_event_loop(self):
"""Return the running event loop if any, and the default event
loop otherwise.
"""
"""Return the running loop if any, and the default loop otherwise."""
running_loop = self.get_running_loop()
if running_loop is not None:
return running_loop
return self.get_default_loop()

def set_event_loop(self, loop):
"""Set the default event loop if the former loop is not currently
running.
"""
if self.get_running_loop() is not None:
raise RuntimeError('The former loop is currently running')
"""Set the default event loop for the current context."""
self.set_default_loop(loop)


Expand Down