I am looking at someone's code which has this kind of "docstrings" all over the place:
SLEEP_TIME_ON_FAILURE = 5
"""Time to keep the connection open in case of failure."""
SOCKET_TIMEOUT = 15
"""Socket timeout for inherited socket."""
...
As per the Python documentation, docstrings are applicable only in the context of the beginning of a module, class, or a method.
What is the implication of the above non-standard practice? Why does Python allow this? Doesn't this have performance impact?