Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zodiakzz
on Aug 9, 2021
|
parent
|
context
|
favorite
| on:
The unknown features of Python's `operator` module
JS arrow functions don't have names either, it's inferred from the left hand side variable name. Can't Python do something similar?
jonathrg
on Aug 9, 2021
[–]
If you assign a lambda to a variable, you might as well use a def. A more typical use of a lambda is as an arguments to a function call. What would be the name of, say, the first argument to map(lambda x: x*2, numbers)?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: