Was going through a Python tutorial, but it seems kinda dated. Wanted to know if people regularly use docstrings in the workforce. Or are they somewhat irrelevant because you can convey most of that info via comments and context? Do jobs make you use them?
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.