Call me when the results are compliant with PEP8
Convert any Python file into a single line of code
11–20 of 27 posts
Re: Convert any Python file into a single line of code
#12Re: Convert any Python file into a single line of code
#13Re: Convert any Python file into a single line of code
#14Re: Convert any Python file into a single line of code
#15Re: Convert any Python file into a single line of code
#16+1 for the amusing faq. And I think this is a cool project. I'll use it just to learn better ways to make one-liners for use in other shell scripts and makefiles. Python has always been harder than the other languages I know to make one-liners, but on occasion it's quite useful.
Re: Convert any Python file into a single line of code
#17For a very limited definition of "any python file". Still brings me back to highschool, where we toyed with that kind of tricks (someone builds something, the others try to figure out how it works). Fun times!
Re: Convert any Python file into a single line of code
#18+1 for the amusing faq. And I think this is a cool project. I'll use it just to learn better ways to make one-liners for use in other shell scripts and makefiles. Python has always been harder than the other languages I know to make one-liners, but on occasion it's quite useful.
On what occasion would a one-liner be useful? I'm genuinely curious, because I can't think of any such case, but I wouldn't doubt there being a few.
Re: Convert any Python file into a single line of code
#19+1 for the amusing faq. And I think this is a cool project. I'll use it just to learn better ways to make one-liners for use in other shell scripts and makefiles. Python has always been harder than the other languages I know to make one-liners, but on occasion it's quite useful.
On what occasion would a one-liner be useful? I'm genuinely curious, because I can't think of any such case, but I wouldn't doubt there being a few.
I don't write Perl much anymore, but that was far and away my __favorite__ way to use it. I love coding in Python now, more than I ever liked programming in any language (except perhaps lisp), but I still don't feel I can use it on the command line that way.
In the context of a Python program, I can't see the value of a Lovecraftian lambda (unless maybe in code golf comments?), but I found this article very appealing mainly because it's quite a feat. Doing anything nontrivial in a lambda is a pain in the ass, so the fact that someone wrote a tool to do it is awesome.