3 ms·
> arrow function notation Arrow functions bind this to the lexical scope, which is useful. (In a regular function the value of this depends on how it's called.
by ptx 7y ago
> arrow function notation
Arrow functions bind this to the lexical scope, which is useful. (In a regular function the value of this depends on how it's called.)
> python which was resistant to the idea of 20 ways to do the same thing
This was in comparison to Perl which intentionally has an unusual excess of different ways to do things.
> "walrus" operator
Simplifies a very common pattern.
m = re.match(r"my_key = (.*)", text)
if m:
print(m.group(1))