Hello
I ran across this accidentally and wonders how to make the doctest in
following code snippet work:
import doctest
def a():
"""
>>> a = '\\r\\n'
>>> print a
No matter how many blank lines I add here, it just can't get enough -_-
"""
pass
doctest.testmod()
ps: I want variable "a" to be '\r\n', but python kept telling me
ValueError: line 4 of the docstring has inconsistent leading
whitespace: "'"
Why can't doctest module deal with statement "a='\r\n'"?
--
Luyun Xie
http://magefromhell.blogspot.com/
(http://blog.hellmage.info/)
--
http://mail.python.org/mailman/listinfo/python-list