We're having an internal discussion on our team about the best practice for handling docstrings. In Python, we'd do something like:
"""This is a module level docstring."""
class SomeClass(object):
"""This is a class level docstring."""
def some_method(self, arg1, arg2):
"""This is a method level docstring."""
In coffeescript, we'd like to mimic the pattern:
### This is a module level docstring. ###
SomeObject =
### This is an object level docstring. ###
someMethod: ->
### This is a method level docstring. ###
...
# Some inline comment
...
I like this approach as it distinctly separates "docstrings" from inline comments, but it appears that triple ### renders a multi-line comment to the compiled javascript -- which is probably undesired in most cases.
Any guidance would be helpful - thx :)
We're having an internal discussion on our team about the best practice for handling docstrings. In Python, we'd do something like:
In coffeescript, we'd like to mimic the pattern:
I like this approach as it distinctly separates "docstrings" from inline comments, but it appears that triple
###renders a multi-line comment to the compiled javascript -- which is probably undesired in most cases.Any guidance would be helpful - thx :)