I recently stumbled on this article about Shell Script Best Practices (https://sharats.me/posts/shell-script-best-practices/) here on HN and appreciated the format (concise, curated, well explained, based on experience).<p>I was wondering if someone knows of a similar ressource for python ?
Read pep8, as others suggest, but don’t use a linter.<p>> However, know when to be inconsistent – sometimes style guide recommendations just aren’t applicable. When in doubt, use your best judgment. Look at other examples and decide what looks best.<p>-pep8
Use a linter, personally pylint has helped me learn to write more "Pythonic" code. If you're using vscode, you can easily integrate it or any other python linter.<p><a href="https://learn.microsoft.com/en-us/visualstudio/python/linting-python-code?view=vs-2022" rel="nofollow">https://learn.microsoft.com/en-us/visualstudio/python/lintin...</a><p>If you also want a linter for bash, check out shellcheck: <a href="https://github.com/koalaman/shellcheck" rel="nofollow">https://github.com/koalaman/shellcheck</a>