Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is python not a good language for one liners? One liners are literally the pythonic way.


By one-liners I meant things like Perl one-liners:

    perl -pe 's{<b>([^<]+)</b>}{<em>\1</em>}g' < foo.html > out.html
Python would never let you get away with treating it like an improved sed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: