summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/coroutines.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:45:18 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:45:18 (GMT)
commit9625340cc8ca426d0f339d460022955bc01155fd (patch)
tree02bb10987b53cbaedad246122b5470e35b26e40e /Lib/asyncio/coroutines.py
parent401e52e80374783cc5d04ccee8071b540340c46b (diff)
parent389e3d768d8f5bd312476db795f6432651bc656b (diff)
downloadcpython-9625340cc8ca426d0f339d460022955bc01155fd.zip
cpython-9625340cc8ca426d0f339d460022955bc01155fd.tar.gz
cpython-9625340cc8ca426d0f339d460022955bc01155fd.tar.bz2
Merge 3.5 (asyncio)
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r--Lib/asyncio/coroutines.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py
index 15475f2..e11b21b 100644
--- a/Lib/asyncio/coroutines.py
+++ b/Lib/asyncio/coroutines.py
@@ -9,14 +9,12 @@ import sys
import traceback
import types
+from . import compat
from . import events
from . import futures
from .log import logger
-_PY35 = sys.version_info >= (3, 5)
-
-
# Opcode of "yield from" instruction
_YIELD_FROM = opcode.opmap['YIELD_FROM']
@@ -140,7 +138,7 @@ class CoroWrapper:
def gi_code(self):
return self.gen.gi_code
- if _PY35:
+ if compat.PY35:
__await__ = __iter__ # make compatible with 'await' expression