diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2018-11-04 07:18:43 +0100 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2018-11-04 07:18:43 +0100 |
| commit | b9d42ec4234118b1783d77befa2b8e2c9d781ef2 (patch) | |
| tree | c33a2f349130857c39bd4a8c6c80250af1f4d825 /src | |
| parent | 2d1e9ba1072951a2c0eb8d280520fbc40b571652 (diff) | |
| download | python-decorator-git-b9d42ec4234118b1783d77befa2b8e2c9d781ef2.tar.gz | |
Fix
Diffstat (limited to 'src')
| -rw-r--r-- | src/decorator.py | 8 |
1 files changed, 4 insertions, 4 deletions
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: |
