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 |
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 |
This is sad man. Dont they have maps and filters?
Yes, both
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
>if
>if
>if
this is what happens when you don't have monads. sad.
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.
In Perl this is just
my $catalog = from_json get 'a.4cdn.org/g/catalog.json';
what the frick is this spacing/indentation
That is how python read blocks of code / contexts.
Yes it is moronic.
Its a little easier to debug if you separate them.
>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
why not
if int(y['locked']) == 1 or int(y['omitted_posts']) == 746:
continue
also
>bare except
>bare except
YOU WILL CATCH THE BUGS
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[
>bl*cklist
uh, sweety? it's, like, 2022
> three if-clauses one inside another
anon let me introduce to a wonderful keyword called "and"
>3 nested ifs
Just combine the conditions moron. But that's probably too much for a pythontard.
programming languages shouldn't be like speaking to humans
kys
Python code is really fricking ugly
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?
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"?
>16 tabs
jesus learn to use a function
Look at all those indentations.. jeeeeesus a little extra ones and you will have Ttrump great wall!
Use a formatter for fricks sake.
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.