Live data from Hacker News

Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

github.com

11–20 of 78 posts

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#14
post #11

> Just download and chmod it No source? No thanks. Edit: Discard this comment! I thought pwk in the repo was an executable because it did not have a ".py" ending and did not care to check. Sorry!

What? It's a python script, 'it' there is the source. It's executable via the python interpreter given in its shebang line.

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#16

Can someone help me understand the rationale behind semantic whitespace as a replacement for explicit delimiters? Is it purely aesthetic?

It forces consistent formatting within a file.

But I think it was more relevant years ago. These days I see a lot of people using code formatters.

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#18
post #11

> Just download and chmod it No source? No thanks. Edit: Discard this comment! I thought pwk in the repo was an executable because it did not have a ".py" ending and did not care to check. Sorry!

"pwk" is both code and "executable" -- you can open it with any text editor. I didn't want to name it "pwk.py" to save on typing on the command line. --m

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#20

Can someone help me understand the rationale behind semantic whitespace as a replacement for explicit delimiters? Is it purely aesthetic?

It forces consistent formatting within a file. But I think it was more relevant years ago. These days I see a lot of people using code formatters.

Yeah that makes a bit more sense, thinking back to arguments about aligning hash key/value pairs in code reviews and how that just never seems to come up anymore (thank god)
Post reply on HN