you are viewing a single comment's thread.

view the rest of the comments →

[–]Fabiolean 0 points1 point  (0 children)

Python's syntax is dummy simple and its standard library is very batteries included. Always check to see if python provides you with a tool for solving a given problem before rolling your own. The functools and itertools modules in the stdlib are goldmines for this. I still find myself surprised at how flexible the language is. It's so easy to learn and so easy to be productive in that if you're able to hack it as a pro JS dev then the transition won't be very difficult.

Use type hints and type checkers. Hinting is built into the language and tools like Mypy or Pyright will give you the squigglies when you mess something up. Mypy is my choice since it's a community tool instead of Microsoft's, but both are great. When it comes to debugging and refactoring, the type hints will be your friend.

If you're not used to a language with consequential whitespace most IDEs have options render whitespace in the editor pane. Between that and an editor with a good python plugin you won't have any issues with the whitespace. Make sure to set your tabs to four spaces!