Re:Show HN: Making Python one-liner-fit with the new pwk (Py...
by neycmrtn on Monday November 23, 2020 @04:38AM
(#25185068)
Aye, in general legibility >> compactness. Apart from the intellectual exercise (fun; !work), one-liners imo come in handy in:
>some_complex_tool | 'my one liner' | some_other_complex_tool > result.txt
Not putting the one-liner logic into a separate script avoids an additional lookup for someone learning what is going on, along with any deployment/path/.. dependencies to that separate script.
>some_complex_tool | 'my one liner' | some_other_complex_tool > result.txt
Not putting the one-liner logic into a separate script avoids an additional lookup for someone learning what is going on, along with any deployment/path/.. dependencies to that separate script.