Martin Panter added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29987>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com