This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author isedev
Recipients isedev
Date 2014-09-07.15:42:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1410104545.64.0.977572846825.issue22355@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-09-07 15:42:25isedevsetrecipients: + isedev
2014-09-07 15:42:25isedevsetmessageid: <1410104545.64.0.977572846825.issue22355@psf.upfronthosting.co.za>
2014-09-07 15:42:25isedevlinkissue22355 messages
2014-09-07 15:42:25isedevcreate