@folkerschamel @zenforyen @kevin @ado
Actually, I think that #type #hints in the #function #signature are usually *better* than having them in #docstrings. Not only can they not get out of date / become wrong (without causing checking failures), static type checking is much easier this way.
#type #hints #function #signature #docstrings
#Python question:
How do you talk about \n chars in #docstrings? do you r""" the docstring?
Do you spell out "new line char"?
š Ā I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
š§©Ā All solutions use only theĀ #PythonStandardLibraryĀ with no need for external packages
š¬Ā #Tests are included in function #docstrings and can be run using theĀ #doctestĀ module
ā ļø I don't think I will be able to enter the #solutions every day and definitely not in the morning
š I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
#github #python #adventofcode #pythonstandardlibrary #tests #docstrings #doctest #solutions #aoc #improve #knowledge #leaderboard
@HeidiSeibold I try to document my software well. Keep documentation and code together. I believe this makes it less likely to get out of sync.
In #Python , #docstrings are great for usage documentation. They are embedded in the code and at the same time facilitate automatic generation of nicely formatted, coherent documentation.
I also try to improve code readability by opting for more self-explanatory code structures and naming and comment sparingly where necessary.