Iestyn Elfick added the comment:

Possible fix:

--- /usr/lib64/python3.3/inspect.py     2014-06-30 19:21:52.000000000 +0200
+++ inspect.py  2014-09-07 17:41:29.463936079 +0200
@@ -600,7 +600,8 @@
         if not hasattr(object, 'co_firstlineno'):
             raise IOError('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|class)\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)')
         while lnum > 0:
             if pat.match(lines[lnum]): break
             lnum = lnum - 1

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22355>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to