From d3d52a3797ed6f093510c050f0de036b77a2604a Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 5 May 2016 22:13:25 -0400 Subject: [PATCH] README: Highlight python code --- README.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index f68dc2b..dd329ad 100644 --- a/README.rst +++ b/README.rst @@ -25,14 +25,18 @@ Using uvloop ------------ To make asyncio use uvloop, you can install the uvloop event -loop policy:: +loop policy: + +.. code:: python import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) Or, alternatively, you can create an instance of the loop -manually, using:: +manually, using: + +.. code:: python loop = uvloop.new_event_loop() asyncio.set_event_loop(loop)