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 rhettinger
Recipients rhettinger
Date 2015-01-10.09:33:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420882396.37.0.573730184021.issue23217@psf.upfronthosting.co.za>
In-reply-to
Content
The help() function mysteriously captures a comment on the line preceding an inner function definition in a nested scope.

Given this code:
----------------

    def outer(func):
        #comment
        def inner():
            return
        return inner

    @outer
    def f():
        return


Calling help(f) produces:
-------------------------

    Help on function inner in module __main__:

    inner()
        #comment
History
Date User Action Args
2015-01-10 09:33:16rhettingersetrecipients: + rhettinger
2015-01-10 09:33:16rhettingersetmessageid: <1420882396.37.0.573730184021.issue23217@psf.upfronthosting.co.za>
2015-01-10 09:33:16rhettingerlinkissue23217 messages
2015-01-10 09:33:16rhettingercreate