On 4/16/06, Paul Moore <p.f.moore at gmail.com> wrote: > Personally, my instinct is that having the whole traceback in a > doctest is at least as ugly. Well, it depends on what you use doctest for. If you use it to write unit tests, the try/except solution is fine, and perhaps preferable. If you use it as *documentation*, where doctest is used to ensure that the documentation is accurate, showing a (short) traceback seems to be the logical thing to do. In a sample session where you want to show that a certain exception is raised for a certain combination of erroneous arguments (for example), showing the traceback is much more natural than putting a try/except around the erroneous call. So one person's ugly is another person's pretty. -- --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4