From b9d42ec4234118b1783d77befa2b8e2c9d781ef2 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Sun, 4 Nov 2018 07:18:43 +0100 Subject: Fix --- src/decorator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/decorator.py b/src/decorator.py index 80507ed..1b5155f 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -235,10 +235,10 @@ def decorate(func, caller, extras=()): evaldict[ex] = extra es += ex + ', ' - if sys.version_info[2:] == (3, 5): - # With Python 3.5 isgeneratorfunction returns True for all coroutines - # However we know that it is NOT possible to have a generator - # coroutine in python 3.5: PEP525 was not there yet. + if '3.5' <= sys.version < '3.6': + # with Python 3.5 isgeneratorfunction returns True for all coroutines + # however we know that it is NOT possible to have a generator + # coroutine in python 3.5: PEP525 was not there yet generatorcaller = isgeneratorfunction( caller) and not iscoroutinefunction(caller) else: -- cgit v1.2.1