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 martin.panter
Recipients Thomas Antony, martin.panter
Date 2017-04-05.08:49:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491382152.06.0.321484385718.issue29987@psf.upfronthosting.co.za>
In-reply-to
Content
Not in general. I think you would have to make special cases for partial functions, __wrapped__, and whatever else there is, and combinations of these. It would be very hard to determine the correct result for test2 in

test2 = lambda: test(a=10)  # test2() returns a generator

def test(a):
    '''Redefined as a non-generator!'''
# Now test2() returns None

Maybe there is an argument for supporting partial as a new feature, but I don’t think it is a bug. I think there is precedent with the inspect.getargspec etc.
History
Date User Action Args
2017-04-05 08:49:12martin.pantersetrecipients: + martin.panter, Thomas Antony
2017-04-05 08:49:12martin.pantersetmessageid: <1491382152.06.0.321484385718.issue29987@psf.upfronthosting.co.za>
2017-04-05 08:49:12martin.panterlinkissue29987 messages
2017-04-05 08:49:11martin.pantercreate