When I need to write extensive comments about functions, I use docstrings. However, I'm not sure what the equivalent for file level comments is in Python, and whether it differs for modules vs scripts.
Is it common to use this style?
"""
file.py: module for X
Detailed information...
"""
import x
def foo(bar):
return 42
Or perhaps this?
# file.py: module for X
# More info...
import x
# ...
Any thoughts?
__doc__, the other one is just a comment.