I am getting trouble with nested triple quoted strings in doctest.
For instance

$ cat x.py
"""
>>> dummy = '''
something
here
'''
"""
import doctest; doctest.testmod()

$ python x.py

**********************************************************************
File "x.py", line 2, in __main__
Failed example:
    dummy = '''
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.4/doctest.py", line 1243, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__[0]>", line 1
         dummy = '''
                  ^
     SyntaxError: EOF while scanning triple-quoted string
**********************************************************************

Is this a know bug? Any workaround? Thanks for comments,


                     Michele Simionato

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to