Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dotancohen
77 days ago
|
parent
|
context
|
favorite
| on:
Jqfmt like gofmt, but for jq
Import checks and doctests you can run before any script code anyway, and exit() if needed. The advantage of `if __name__ == "__main__":`, is that you can import the script as module on other code, as in that case __name__ will not be __main__.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: