[issue23217] help() function incorrectly captures comment preceding a nested function

2015-01-18 Thread Gwenlliana
Gwenlliana added the comment: The capture actually worked correctly. It seems to be caused by the artifacts introduced by the evaluation function decorators. Decorator lists for functions are compiled to a series of high-order function applications to the original function, followed by an

[issue23217] help() function incorrectly captures comment preceding a nested function

2015-01-18 Thread Gwenlliana
Gwenlliana added the comment: Though standard library contains a workaround on the decorator issue (functools.wraps), but it still failed to patch func_code.co_firstlineno, which led the pydoc module to capture the wrong comment. -- ___ Python