I found this one out because some of the homework questions I met were tested by docstrings, and it gives me failures.
For example:
def foo(x):
"""
>>> foo(5)
25
>>> foo(6)
36 # Are you sure?
"""
return x**2
if __name__ == '__main__':
import doctest
doctest.testmod(verbose=True)
The example above fails with:
Expected:
36 # are you sure?
Got:
36
I wonder if we are not supposed to add comment in docstring? Or there is a way to make python to ignore the comment in docstring?