Comment

Comment by tobik

Bad example :)

Most simple uses of lambda like this can be substituted with functions from the operator module:

  import operator

  formulas = {
    'sum': operator.add,
    'subst': operator.sub,
    'mult': operator.mul,
    'pow': operator.pow
  }
parent tobik 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton