Author ballingt
Recipients ballingt
Date 2014-04-14.17:31:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

inspect.getsourcelines incorrectly guesses what lines correspond
to the function foo
see getblock in
once it finds a lambda, def or class it finishes it then stops
so get getsourcelines returns only the first two noop decorator
lines of bar, while normal behavior is to return all decorators
as it does for foo
import inspect
from pprint import pprint
def noop(arg):
    def inner(func):
        return func
    return inner
def foo():
    return 1
@noop(lambda: None)
def bar():
    return 1
Date User Action Args
2014-04-14 17:31:00ballingtsetrecipients: + ballingt
2014-04-14 17:31:00ballingtsetmessageid: <>
2014-04-14 17:31:00ballingtlinkissue21217 messages
2014-04-14 17:31:00ballingtcreate