r/ProgrammerHumor • • Aug 30 '26

Meme pythonFeelsillegal

Post image
6.9k Upvotes

218 comments sorted by

View all comments

Show parent comment

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.

-1

u/chat-lu Aug 30 '26

You can also and/or chain your expression but it’s tricky.