Problem with mixing doctest with gettext _()

Peter Otten __peter__ at web.de
Fri Feb 27 13:35:52 EST 2004


Pierre Rouleau wrote:

> It worked, BUT only for a simple function, it fails if I add a another
> simple function:

Haven't read your post completely, but judging from the error message, it's
just a minor glitch in mydisplayhook(). Try the following instead:


>>> def mydisplayhook(a):
...     if a is not None:
...             sys.stdout.write("%r\n" % (a,))
...

That should be able to cope with tuples as commandline results.

Peter



More information about the Python-list mailing list