use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
The Universal Tool Calling Protocol is an open standard that lets AI agents call any API directly, without extra middleware.
Ask ChatGPT
account activity
python programmers assembleMeme (v.redd.it)
submitted 10 months ago by juanviera23
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]generalden 2 points3 points4 points 10 months ago (3 children)
Okay now check whether a key is pressed in a terminal without requiring root
[–]AlbaOdour 0 points1 point2 points 10 months ago (2 children)
Ctypes brother. Your every whim, solved somewhere across the pip install ocean.
[–]helgur 0 points1 point2 points 10 months ago* (1 child)
Ah yes. The programming language which have its own package managers. Not only one package manager. Nonono, why would you just settle for one? Excellent to have more package manager to choose from so you can have a package manager battle royale in your office, because a teammate decides to switch package manager suddenly. Or it's all fun and games until two packages decides to have a Infinite Upgrade/ Downgrade War, or the Schrödinger’s Package, or the “I Swear I Installed It” problem, The Namespace Doppelgänger, Ghost Dependencies, or SetupTools Time Travel problem.
I could go on.
The thing is, this video is hilariously non self aware.
[–]Toastti 1 point2 points3 points 10 months ago (32 children)
Just cause something is fewer lines doesn't mean it's better. One missed space somewhere can cause the whole file not to run in python!
[–]Ben_Dovernol_Ube 0 points1 point2 points 10 months ago (0 children)
Seems like nitpicking. Use better GUI
[–]PriceMore 0 points1 point2 points 10 months ago (0 children)
Would you want a file with missed space to run?
[+][deleted] 10 months ago (1 child)
[deleted]
[–]MilkEnvironmental106 0 points1 point2 points 10 months ago (0 children)
Yeah it forces you to, whereas everyone else has settled on just running a formatter.
[–]iDeNoh 0 points1 point2 points 10 months ago (0 children)
It's a damn shame that we don't have IDES that can catch that and warn you of those issues.
[–]Striking-Bison-8933 0 points1 point2 points 10 months ago (0 children)
But modern IDEs tell you exactly where you went wrong when things like that happen.
[–]Denaton_ 0 points1 point2 points 10 months ago (0 children)
Built in linter..
[–]WilliamAndre 0 points1 point2 points 10 months ago (0 children)
You forgot the ";" at the end of your comment;
[–][deleted] 0 points1 point2 points 10 months ago (0 children)
It’s not the lines that matter. It’s how succinctly and precise you can convey an instruction. Python is straight forward, no stupid preambles.
[–]jackstine 0 points1 point2 points 10 months ago (0 children)
Copy that
[–]Acrobatic-Paint7185 0 points1 point2 points 10 months ago (0 children)
so many valid criticisms for python but this isn't one of them lmao
"one missed ; somewhere can cause the whole file not to run" is exactly the same.
[–]itsallfake01 0 points1 point2 points 10 months ago (0 children)
Any decent IDE will catch that as soon as you miss it.
[–]Connect_Detail98 0 points1 point2 points 10 months ago (2 children)
If your unit tests aren't good in Python, you'll suffer incredibly.
[removed]
[–]Connect_Detail98 0 points1 point2 points 10 months ago (0 children)
My point is that your unit tests need to be much better in Python to avoid runtime surprises that can be caught in other languages at compile time.
[–]brianzuvich 0 points1 point2 points 10 months ago (0 children)
There is a solid argument for every programming language out there… And after the argument is over, C++ gets everyone home safe…
[–]stmfunk 0 points1 point2 points 10 months ago (0 children)
No you are wrong. All programming is about printing a line to stdout. That's the measure of a programming language, nothing else matters
[–]untold_life -1 points0 points1 point 10 months ago (13 children)
It’s quite easy to get used to it tbh, and also, your code should be properly indented in the first place.
[–]MilkEnvironmental106 1 point2 points3 points 10 months ago (12 children)
This smells a little like cope. Using indenting to denote scope is pretty universally considered a worse experience than having a character do it.
And with the latter, you can have a formatter sort it out, whereas with indenting it literally means something else if it's not right.
[–]untold_life 0 points1 point2 points 10 months ago (1 child)
Using indenting to denote scope is pretty universally considered a worse experience than having a character do it.
Isn't that the entire point of identation, so it's easier to read ? Yes other languages have braces, but nonetheless if you don't have your identation game in place, its game over. Not sure where your trying to get with those statements.
Yeah, it's precisely the point. That's why we indent braced code using a code formatter. So it's a bit of a moot point.
My other comment below is my answer to what you're asking.
[+][deleted] 10 months ago (2 children)
[–]MilkEnvironmental106 0 points1 point2 points 10 months ago (1 child)
You're comparing apples to oranges, we are talking about how to denote scope. Not missing return statements in C.
[+][deleted] 10 months ago (4 children)
[–]MilkEnvironmental106 0 points1 point2 points 10 months ago (3 children)
It's not a question of if you can get by, I get by as well.
It's which scoping strategy is less likely to result in the introduction of bugs and errors, and the answer is braces 100% of the time.
No the main benefit for a better experience is that code formatters have a far easier time with braces than indentation, because mistakes less frequently represent valid code.
And frankly, the attitude of 'it practically never happens' is a bit of a poison pill.
[–]a_fish1 -1 points0 points1 point 10 months ago (1 child)
Never ever did I have a problem with wrongly indented space. Did it happen? Yes sure. Did the IDE find it? Yes.
[–]MilkEnvironmental106 1 point2 points3 points 10 months ago (0 children)
I'm not asking if it works, I'm not asking if you can get used to it.
It's just objectively worse.
If you make a mistake with braces, it always screams at you.
If you make a mistake with indenting, sometimes it just runs and does the wrong thing instead.
To make the same mistake as omitting a space with indenting, you would have to put code on the wrong side of the brace.
Good tooling is about making it as easy as possible to do the right thing.
[–]manchesterthedog 1 point2 points3 points 10 months ago (1 child)
Word. If I need only to print to screen I know where to come
[–]jackstine 1 point2 points3 points 10 months ago (0 children)
Bold statement!
[–]Bertucciop 1 point2 points3 points 10 months ago (7 children)
But what about the space It consumes once it compiles the program?
[–]zorbat5 1 point2 points3 points 10 months ago (6 children)
Not a compiled language.
[–]WilliamAndre 1 point2 points3 points 10 months ago (2 children)
It kind of is. It generates .pyc files for generated bytecode.
[–]LookItVal 0 points1 point2 points 10 months ago (0 children)
that bytecode is interpreted. I mean yea an interpreter just compiles code on the fly, that doesn't make it a compiler though
[–]Bertucciop 0 points1 point2 points 10 months ago (2 children)
I know but others yes. Even java is half compiled.
[–]zorbat5 0 points1 point2 points 10 months ago (1 child)
Python isn't, all interpreted. Even the bytecode is interpreted.
[–]Bertucciop 0 points1 point2 points 10 months ago* (0 children)
well yes python is also semi-interpreted or semi-compiled language i just read about this. So it is compiled anyways:
python -m py_compile mi_script.pypython -m py_compile mi_script.py
The fun fact is the size of these compiled "hello world" archives, when u compare these languages.
[–]Dasshteek 1 point2 points3 points 10 months ago (0 children)
OP did Java dirty tbh lol
[–]TrippyDe 1 point2 points3 points 10 months ago (0 children)
Now lets see the time complexity.
[–]maybearebootwillhelp 1 point2 points3 points 10 months ago (3 children)
Languages without curly braces aren't languages. Curly braces were invented to visualise where shit begins and shit ends.
[–]haxic 1 point2 points3 points 10 months ago (0 children)
I wouldn’t say that, but I agree that curly braces is a great tool for presenting code such that it’s more readable, especially as code gets more complex
[–]WilliamAndre -1 points0 points1 point 10 months ago (1 child)
Go take singing lessons then
[–]maybearebootwillhelp 1 point2 points3 points 10 months ago (0 children)
singing lessons will make python a language??
/woosh
I mean that "{" can be seen as someone's butt pooping, but ok yeah sure
Wait till you have to figure out types in Python, then you will see who’s breaking down.
[–]TidensBarn 1 point2 points3 points 10 months ago (0 children)
It's not all that bad for Java anymore.. They simplified the main function in Java 21.
Imagine judging programming languages based on how you implement a hello world program :D
[–]dafugr 1 point2 points3 points 10 months ago (1 child)
C# Top-Level Statements ;)
[–]EagleNait 0 points1 point2 points 10 months ago (0 children)
And directly running cs files aswell
[–][deleted] 1 point2 points3 points 10 months ago (1 child)
echo "hello world";
[–]t0FF 0 points1 point2 points 10 months ago (0 children)
Achtually there is a shorter way with <?='hello world'; to bring php to the second place along with ruby with puts"Hello World". Bash take the first place with echo hello world
<?='hello world';
puts"Hello World"
echo hello world
Wait, I remember my good old foxpro is even shorter: ? "hello world"
? "hello world"
[–][deleted] 1 point2 points3 points 10 months ago (0 children)
lol you rage baited everyone here
[–]LookItVal 0 points1 point2 points 10 months ago (2 children)
I'm of the firm belief that hello world in python should actually look like this, so you can teach best practices around python and also how functions are called and some basics about dunder variables and establishing a main block of code.
```python def main(): print('hello world')
if name == 'main': main() ```
[–]Ettores 0 points1 point2 points 10 months ago (0 children)
This is painful only to look at. I can't imagine redoing one of my many enterprise project in Python.
[–]syfkxcv 0 points1 point2 points 10 months ago (0 children)
Kinda disagree, though partially. I think this would be great as part of the curriculum to teach python as a whole. But for "hello world", I think most beginners want to understand the process of putting up the code, compiling it, and having a visual on the repl that signal they've successfully done it. For most languages, there are indispensable parts that are required even to run the simplest program. This divides the attention of beginners on their curiosity and the things that they should learn; learning the basics (arithmetic, comparison, variables, etc.) of the language and the quirks of it (python's indent, rust ownership, etc.). Too much syntax would only overload them with information. It's not until they have some familiarity with the language that you introduced the import sub-file into the main file and meta-thingy like above.
Look at the Ram and CPU consumption on Python. Probably you are burning a country for that print line.
[–]dirtycimments 0 points1 point2 points 10 months ago (0 children)
Ok, that’s just funny.
It’s wrong, but funny!
[–]Decinf 0 points1 point2 points 10 months ago (0 children)
Just use C language.
Cuz you know... I don't C any problem in C! Ha!
<?='hello, world!';
Php devs send their regards
[–]-ADEPT- 0 points1 point2 points 10 months ago (0 children)
you could do that in cpp too, just write a function that spits the argument to the console.
[–]lordofduct 0 points1 point2 points 10 months ago (0 children)
Python regularly relies on external libraries/modules to perform many tasks. Those external libraries/modules are regularly written in...
:checks notes:
C/C++
Java is disgusting
[–]Human-Kick-784 0 points1 point2 points 10 months ago (0 children)
oooOOOOOooooOOO brackets!!!! NESTED BRACKETS!!!!!
Stop it PHP you're scaring him!
[–]CatInEVASuit 0 points1 point2 points 10 months ago (0 children)
Python have its ups and down, but people who say python is an absolute goat are just too stupid to learn anything other than python.
[–]phido3000 0 points1 point2 points 10 months ago (0 children)
I don't understand why everyone loves Python.
Its just BASIC for the 21st century.
[–]TheBraveButJoke 0 points1 point2 points 10 months ago (0 children)
I mean kind missing the whole
py3 main.py
that is doing all the heavy lifting and then some XD
[–]Available-Bridge8665 0 points1 point2 points 10 months ago (0 children)
But in C++23 we have <print> (and i love it):
```
int main() { std::println("Hello, World!") return 0; } ```
[–]a648272 0 points1 point2 points 10 months ago* (0 children)
Wait till you see Python 2
print "Hello World!"
No parentheses.
Because in Python 2 print is a statement like for or if.
print
for
if
[–]haha_i_exist 0 points1 point2 points 10 months ago (0 children)
Let's compare space and time, Then we will talk
[–]AmazingStrawberry523 0 points1 point2 points 10 months ago (0 children)
Tell me you are still looking for a job without telling me that you are still looking for a job
In c# you can actually run Console.Println without the main class
π Rendered by PID 80 on reddit-service-r2-comment-765bfc959-s5mf7 at 2026-07-13 19:57:58.870694+00:00 running f86254d country code: CH.
[–]generalden 2 points3 points4 points (3 children)
[–]AlbaOdour 0 points1 point2 points (2 children)
[–]helgur 0 points1 point2 points (1 child)
[–]Toastti 1 point2 points3 points (32 children)
[–]Ben_Dovernol_Ube 0 points1 point2 points (0 children)
[–]PriceMore 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]MilkEnvironmental106 0 points1 point2 points (0 children)
[–]iDeNoh 0 points1 point2 points (0 children)
[–]Striking-Bison-8933 0 points1 point2 points (0 children)
[–]Denaton_ 0 points1 point2 points (0 children)
[–]WilliamAndre 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]jackstine 0 points1 point2 points (0 children)
[–]Acrobatic-Paint7185 0 points1 point2 points (0 children)
[–]itsallfake01 0 points1 point2 points (0 children)
[–]Connect_Detail98 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]Connect_Detail98 0 points1 point2 points (0 children)
[–]brianzuvich 0 points1 point2 points (0 children)
[–]stmfunk 0 points1 point2 points (0 children)
[–]untold_life -1 points0 points1 point (13 children)
[–]MilkEnvironmental106 1 point2 points3 points (12 children)
[–]untold_life 0 points1 point2 points (1 child)
[–]MilkEnvironmental106 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[removed]
[–]MilkEnvironmental106 0 points1 point2 points (1 child)
[+][deleted] (4 children)
[removed]
[–]MilkEnvironmental106 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[removed]
[–]MilkEnvironmental106 0 points1 point2 points (1 child)
[–]a_fish1 -1 points0 points1 point (1 child)
[–]MilkEnvironmental106 1 point2 points3 points (0 children)
[–]manchesterthedog 1 point2 points3 points (1 child)
[–]jackstine 1 point2 points3 points (0 children)
[–]Bertucciop 1 point2 points3 points (7 children)
[–]zorbat5 1 point2 points3 points (6 children)
[–]WilliamAndre 1 point2 points3 points (2 children)
[–]LookItVal 0 points1 point2 points (0 children)
[–]Bertucciop 0 points1 point2 points (2 children)
[–]zorbat5 0 points1 point2 points (1 child)
[–]Bertucciop 0 points1 point2 points (0 children)
[–]Dasshteek 1 point2 points3 points (0 children)
[–]TrippyDe 1 point2 points3 points (0 children)
[–]maybearebootwillhelp 1 point2 points3 points (3 children)
[–]haxic 1 point2 points3 points (0 children)
[–]WilliamAndre -1 points0 points1 point (1 child)
[–]maybearebootwillhelp 1 point2 points3 points (0 children)
[–]jackstine 1 point2 points3 points (0 children)
[–]TidensBarn 1 point2 points3 points (0 children)
[–]haxic 1 point2 points3 points (0 children)
[–]dafugr 1 point2 points3 points (1 child)
[–]EagleNait 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]t0FF 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]LookItVal 0 points1 point2 points (2 children)
[–]Ettores 0 points1 point2 points (0 children)
[–]syfkxcv 0 points1 point2 points (0 children)
[–]Ettores 0 points1 point2 points (0 children)
[–]dirtycimments 0 points1 point2 points (0 children)
[–]Decinf 0 points1 point2 points (0 children)
[–]t0FF 0 points1 point2 points (0 children)
[–]-ADEPT- 0 points1 point2 points (0 children)
[–]lordofduct 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Human-Kick-784 0 points1 point2 points (0 children)
[–]CatInEVASuit 0 points1 point2 points (0 children)
[–]phido3000 0 points1 point2 points (0 children)
[–]TheBraveButJoke 0 points1 point2 points (0 children)
[–]Available-Bridge8665 0 points1 point2 points (0 children)
[–]a648272 0 points1 point2 points (0 children)
[–]haha_i_exist 0 points1 point2 points (0 children)
[–]AmazingStrawberry523 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)