-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
l1, v1, v2 = (lambda x: x), 1, 2
print(inspect.getsource(l1)[:-1])
# l1, v1, v2 = (lambda x: x), 1, 2
As the request is for the source of lambda, it might be convenient to extract only the lambda
substring, not the whole line.
l1, l2 = (lambda x: x), (lambda x: (x[0] + 1) / 2)
print(inspect.getsource(l1)[:-1])
# l1, l2 = (lambda x: x), (lambda x: (x[0] + 1) / 2)
It might also be nicer to extract the substring of lambda that was requested in case of more than 1 lambda?
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement