I know this may sound a silly question, but coming from Scala, I really appreciate the short notation used with functional expressions involving the placeholder _
.
For example in Scala, to do a mapping
val x = Seq(1,2,3)
val y = x.map(_+1)
The equivalent in Python requires the usage of lambda
which makes the expression much longer:
x = list(1,2,3)
y = list(map(lambda v: v+1, x))
Is it programmed in Python to somewhat introduce the placeholder symbol _
in future versions for notational brevity, when clear from the context?