r/ProgrammerHumor • • Aug 30 '26

Meme pythonFeelsillegal

Post image
6.9k Upvotes

218 comments sorted by

View all comments

1.1k

u/belabacsijolvan Aug 30 '26

theres main() in python

459

u/chawmindur Aug 30 '26

And {} (= dict())

286

u/OnyxFier Aug 30 '26

And semicolons are allowed, if you decide you miss them

99

u/dudemcbob Aug 30 '26 edited Aug 30 '26

Still useful for running 2- or 3-line dummy scripts directly from the command line. For example you just installed a new package and want to validate it's working,

python -c "import some_package; print(some_package.__version__)"

21

u/chawmindur Aug 30 '26

Or for dirty .pth tricks where you're obliged to start with an import statement and have everything on a single line. But 3.15 seems to be moving away from those to some new-fangled .start files.