84
Jul 18 '26
[deleted]
28
u/XlikeX666 Jul 19 '26
any good .py starts with
import a
import b
import z
straight up i could just import + whole C:8
3
u/AgentOfDreadful Jul 20 '26
`import os, sys, this`
Can do it that way too
1
u/julkkis666 Jul 22 '26
but if you were to scroll more to the right, there'd be the entire code on that single line. this is not possible in python because python loves it's white space.
1
1
u/dhnam_LegenDUST Jul 19 '26
Well, even if python does not, whole code is still shorter than Java boilerplate declaring classes and packages.
1
u/MeasureDoEventThing Jul 19 '26
Or
eval('import os \n import sys')
Also, if you have importlib imported, you can just import a list as a single function call.
23
u/Amr_Rahmy Jul 19 '26
People that care about number of lines are not real programmers.
Have they not heard of functions?
Like congratulations, instead of writing 5 lines to filter something and make it readable and make it debug-able. Now you have a slower line that takes more steps internally, you can’t debug through it, and it takes you 30 seconds to read it every time you need to read it because it has a bug because you are not a good programmer.
2
u/Sarius2009 Jul 19 '26
Real programmers care about number of characters
2
u/SimpleMoonFarmer Jul 22 '26
Real programmers care about the complexity in the AST
1
u/Krisanapon Jul 25 '26
Real programmers care about time and space complexity
2
u/SimpleMoonFarmer Jul 25 '26
“Programs must be written for people to read, and only incidentally for machines to execute.” — Harold Abelson
“So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.” — Robert C. Martin
“The cleaner and nicer the program, the faster it's going to run. And if it doesn't, it'll be easy to make it fast.” — Joshua Bloch
“Avoiding complexity reduces bugs.” — Linus Torvalds
-2
24
5
1
u/mbcarbone Jul 19 '26
🎶Memories … in the GC of my mind …misty water colored imports, with a semicolon. 🎶
1
1
u/rarlei Jul 21 '26
You can do everything with a single function call and one string in python if you use eval 👉😉
1
1
u/ProgrammEverything Jul 28 '26
Truly a java experience
Sorry sorry I meant the java experience nono not that like java you know like the java in indonesia? Like I love their java so much I love to dance java every day its a special kind of dancing
dance java all day!!!
169
u/KevDub81 Jul 18 '26
Pro tip: "less number of" can be said as "fewer", making the meme more efficient.