• vrighter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      6 hours ago

      a lambdo which can only contain one expression, and not even a statement is pretty much useless. For anything nontrivial you have to write a separate function and have the lambda be just a function call expression. Which completely defeats the point

    • wewbull@feddit.uk
      link
      fedilink
      English
      arrow-up
      13
      ·
      10 hours ago

      So much Python criticism comes from people who don’t know the language.

      • jacksilver@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        8 hours ago

        I mean, there is a lot wrong with it, but every language has its quirks. Generally I like discussing it’s actual flaws cause it helps me better understand the language.

    • Natanox@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      10 hours ago

      And switch cases (called match cases) are there as well.

      I use lambdas all the time to shovel GTK signal emitions from worker threads into GLib.idle_add in a single line, works as you’d expect.

      Previous commenters probably didn’t look at Python in a really long time.