pipetools
pipetools copied to clipboard
Docstrings
What is a good practice or recommendation for writing docstrings that are simple and clean to write and work well with documentation tools.
I would use standard Python docstring in a def
statement, see answer.
It would be possible to add some docstring feature to pipe
so you could do something like this:
get_py_files = pipe("Get all Python files from directory") | os.listdir | where(X.endswith('.py'))
Not sure if it's worth it.
I see this library becoming the standard for people who think functionally. Writing functions like this in a large codebase is simply impractical given the importance of docstrings for large code bases. I would say it's definitely worth it.