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

Programmer Humor

19176 readers
939 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 month 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.

[–] [email protected] 9 points 1 month 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")
[–] [email protected] 3 points 1 month ago

Looks like TypeScript to me

[–] [email protected] 2 points 1 month ago (1 children)

No, but you can do the same in python

[–] [email protected] 1 points 1 month ago

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

[–] [email protected] 8 points 1 month ago (1 children)

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

[–] [email protected] 1 points 1 month ago (1 children)

Python also have curly bracers, om dictionaries.

[–] [email protected] 5 points 1 month ago

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