• 0 Posts
  • 2 Comments
Joined 2 years ago
cake
Cake day: September 24th, 2023

help-circle

  • Yes, use them. One big advantage is if you hover something in an IDE it will show you the docstring.

    If you’re writing Python you should be using Pylint (or Ruff) and it has a lint to ensure you write them.

    The exception I usually make is for class member variables because it’s super weird that the docstring comes after the variable. I think that’s very confusing for people reading the code so I normally just use comments instead.