from Hacker News

Ask HN: How to become a better Python developer?

by mattcristal on 8/20/22, 3:29 PM with 4 comments

  • by Jeff_Brown on 8/20/22, 3:45 PM

    Pydoc, pytest and mypy are simple, powerful, underused tools.

    @dataclass can make a lot of code cleaner than it would be otherwise.

    Sum types, only available as of 3.10, make a lot of things easily expressible now that were extremely awkward previously.

    Also, learn Haskell. It forces you to learn to keep most of your code pure, limiting IO to a thin top level layer, which makes testing and hence correctness a lot easier.

  • by richardjam73 on 8/21/22, 7:48 AM

    Read the Python Enhancement Proposals PEP's https://peps.python.org/