Python is beautiful. Handling json is like speaking to humans. something that I cant because I am a fucking autistimcomo

Python is beautiful.
Handling json is like speaking to humans
something that I cant because I am a fricking autistimcomo

yes it is
yes its true

sad af if reality

CRIME Shirt $21.68

Shopping Cart Returner Shirt $21.68

CRIME Shirt $21.68

  1. 2 years ago
    Anonymous

    This is sad man. Dont they have maps and filters?

    • 2 years ago
      Anonymous

      Yes, both

    • 2 years ago
      Anonymous

      I was testing it at work this week and somehow a list comprehension is significantly faster than using filter(). I haven't tested map() though

  2. 2 years ago
    Anonymous

    >if
    >if
    >if

    this is what happens when you don't have monads. sad.

    • 2 years ago
      Anonymous

      How the fuch would a monad help here are you fricking moronic? AND is the "design pattern" he is looking for and if the ifs were one after the other at the same level what you would want is a switch.

  3. 2 years ago
    Anonymous

    In Perl this is just
    my $catalog = from_json get 'a.4cdn.org/g/catalog.json';

  4. 2 years ago
    Anonymous

    what the frick is this spacing/indentation

    • 2 years ago
      Anonymous

      That is how python read blocks of code / contexts.
      Yes it is moronic.

      Python code is really fricking ugly

      >3 nested ifs
      Just combine the conditions moron. But that's probably too much for a pythontard.

      Its a little easier to debug if you separate them.

      • 2 years ago
        Anonymous

        >That is how python read blocks of code / contexts.
        i'm talking about how inconsistent the indentation is. sometimes you use two spaces to indent a block, sometimes four. also why are there two line breaks before the first if statement, usually there's zero or one

  5. 2 years ago
    Anonymous

    why not
    if int(y['locked']) == 1 or int(y['omitted_posts']) == 746:
    continue
    also
    >bare except

    • 2 years ago
      Anonymous

      >bare except
      YOU WILL CATCH THE BUGS

      • 2 years ago
        Anonymous

        homie
        if you don't use at least "except Exception" then if your running a loop the KeyboardInterrupt (CTRL+C) error won't register unless u spam it
        or even better
        except Exception as e:
        print(f"error occurred: {e}")[/code[

  6. 2 years ago
    Anonymous

    >bl*cklist
    uh, sweety? it's, like, 2022

  7. 2 years ago
    Anonymous

    > three if-clauses one inside another
    anon let me introduce to a wonderful keyword called "and"

  8. 2 years ago
    Anonymous

    >3 nested ifs
    Just combine the conditions moron. But that's probably too much for a pythontard.

  9. 2 years ago
    sega

    programming languages shouldn't be like speaking to humans

  10. 2 years ago
    Anonymous

    kys

  11. 2 years ago
    Anonymous

    Python code is really fricking ugly

  12. 2 years ago
    Anonymous

    What dog shit code is this and why are you declaring shitty variable names and terrible fricking try/except/pass, what the frick is this dog shit?

  13. 2 years ago
    Anonymous

    This is why everybody hates python shitters. There is nothing beautiful about dealing with a frickhuge data structure where every node is of a mystery type and needs to be casted manually. A reasonable person using a reasonable language would have whatever JSON library he's using map the JSON to a bunch of objects, which can then be used in a type-safe and null-safe way.
    Also, your variable naming scheme is dogshit. Why would you name the variable that holds the contents of a thread "y" instead of "thread"?

  14. 2 years ago
    Anonymous

    >16 tabs
    jesus learn to use a function

  15. 2 years ago
    Anonymous

    Look at all those indentations.. jeeeeesus a little extra ones and you will have Ttrump great wall!

  16. 2 years ago
    Anonymous

    Use a formatter for fricks sake.

  17. 2 years ago
    Anonymous

    to avoid tabs just follow the best practice possible, instead of looking for expected statements and go deeper into the indentation, just check if statement is different than expected one and use continue keyword in loops.
    now your code is more readable and doesn't need 4K monitor to just display your shitty code.

Your email address will not be published. Required fields are marked *