diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-21 19:04:22 +0300 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-21 19:04:22 +0300 |
commit | 8d603f179682baee02684af6eff2f0d8cff6ad9c (patch) | |
tree | 723a5db36ae9abeaae9005c1a6a9fef15022f73a /Lib/inspect.py | |
parent | ad1a34197e0d4b890776b8490853d6b9ee38934a (diff) | |
parent | e4e811d65b51478392a7c69e83b38c6930012eb7 (diff) | |
download | cpython-git-8d603f179682baee02684af6eff2f0d8cff6ad9c.tar.gz |
Merge 3.5 (Issue #24669)
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 42f24cddba..4c1ac1f283 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -798,7 +798,7 @@ def findsource(object): if not hasattr(object, 'co_firstlineno'): raise OSError('could not find function definition') lnum = object.co_firstlineno - 1 - pat = re.compile(r'^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)') + pat = re.compile(r'^(\s*def\s)|(\s*async\s+def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)') while lnum > 0: if pat.match(lines[lnum]): break lnum = lnum - 1 |