I\'d like to write a doctest like this:
\"\"\" >>> print a.string() foo : a bar : b date :
You can write tuples before and after your function (hack inspired by answer of Mark Horvath):
def foo(): """ >>> ();foo();() # doctest: +ELLIPSIS (...) """ print "Hello world" return "Hello world"