--- /usr/local/python-2.4a1/lib/python2.4/inspect.py 2004-08-10 13:58:05.000000000 +0200 +++ inspect.py 2004-08-10 23:11:09.000000000 +0200 @@ -431,7 +431,7 @@ 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)|(.*\slambda(:|\s))') + pat = re.compile(r'^(\s*def\s)|(.*\slambda(:|\s))|^(\s*@)') while lnum > 0: if pat.match(lines[lnum]): break lnum = lnum - 1 @@ -507,7 +507,8 @@ def tokeneater(self, type, token, (srow, scol), (erow, ecol), line): if not self.started: - if type == tokenize.NAME: self.started = 1 + if "@" in line: pass + elif type == tokenize.NAME: self.started = 1 elif type == tokenize.NEWLINE: self.last = srow elif type == tokenize.INDENT: