Message291169
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. |
|
Date |
User |
Action |
Args |
2017-04-05 08:49:12 | martin.panter | set | recipients:
+ martin.panter, Thomas Antony |
2017-04-05 08:49:12 | martin.panter | set | messageid: <1491382152.06.0.321484385718.issue29987@psf.upfronthosting.co.za> |
2017-04-05 08:49:12 | martin.panter | link | issue29987 messages |
2017-04-05 08:49:11 | martin.panter | create | |
|