UmU
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 11 hours ago

The meaning of this

lemmy.ml

message-square
50
fedilink
394

The meaning of this

lemmy.ml

bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 11 hours ago
message-square
50
fedilink
  • jacksilver@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    8 hours ago

    Maybe I’m missing something, but:

    • Python Lambda Functions - https://www.w3schools.com/python/python_lambda.asp
    • Python map - https://www.geeksforgeeks.org/python-map-function/
      • They do have list comprehension, which let you basically one line a map operation more intuitively too.
    • vrighter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      4 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
      12
      ·
      8 hours ago

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

      • jacksilver@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        6 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
      5
      ·
      edit-2
      8 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.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 946 users / day
  • 1.63K users / week
  • 3.76K users / month
  • 9.92K users / 6 months
  • 2 local subscribers
  • 36.3K subscribers
  • 1.36K Posts
  • 21.4K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org