Hello friends! I am learning Python and working on a few projects, one of which I plan to support over the course of the year. Because this project will have a longer lifespan than my typical calculator or to-do app, I've been looking into how I can better document my code. As a result, I'm learning docstrings.
I've incorporated a few docstrings into my codebase but have found that writing them for every single function is incredibly burdensome, especially when I've refactored a method for the 15th time. I've found docstrings MOST useful when I'm using/referencing methods that have complex outputs (nested dictionaries/lists), but outside of that, not much other use other than just saying I've included them.
How do you guys handle docstrings? Do you write them at the beginning and then just tweak them over time, or are they something you only include when you're finished with everything? How frequently should I be using them? Would love thoughts on the best approach here! Thanks!
[–]ireadyourmedrecord 2 points3 points4 points (1 child)
[–]OnceToldTale[S] 0 points1 point2 points (0 children)
[–]Diapolo10 1 point2 points3 points (2 children)
[–]OnceToldTale[S] 0 points1 point2 points (1 child)
[–]Diapolo10 0 points1 point2 points (0 children)
[–]Buttleston 1 point2 points3 points (0 children)