this post was submitted on 12 Aug 2024
1022 points (99.5% liked)

Programmer Humor

24603 readers
915 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] driving_crooner@lemmy.eco.br 4 points 10 months ago (4 children)

Is that python? If it's, thank you, finally learned how to format text in a way that can be read on the script and in the execution.

[–] zaphod@sopuli.xyz 9 points 10 months ago

As the other comments have already said it's not Python. Not sure what you mean with text formatting, do you mean that it's multiple strings that are concatenated using +? You don't need the + in Python, you can do

some_function(
    "part one of really long string"
    " part two of really long string"
)

Which is identical to

some_function("part one of really long string part two of really long string")
[–] Korne127@lemmy.world 9 points 10 months ago (1 children)

It isn't, there are curly braces. It's TypeScript.

[–] driving_crooner@lemmy.eco.br 1 points 10 months ago (1 children)

Python also have curly bracers, om dictionaries.

[–] Korne127@lemmy.world 5 points 10 months ago

Yes, but not for indentation (which is obviously what I meant)

[–] alfenstein@beehaw.org 3 points 10 months ago

Looks like TypeScript to me

[–] ReveredOxygen@sh.itjust.works 2 points 10 months ago (1 children)

No, but you can do the same in python

[–] driving_crooner@lemmy.eco.br 1 points 10 months ago

I was thinking on trying it. Need to see how it works with f formatting.