[Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS (original) (raw)
John J Lee jjl at pobox.com
Sat Apr 15 21:58:25 CEST 2006
- Previous message: [Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS
- Next message: [Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 15 Apr 2006, Tim Peters wrote: [...]
[also John]
Sorry, please ignore the post of mine I'm replying to here.
I missed part of the thread, and Tim has already answered my question... That's news to Tim ;-)
You mentioned use of '...' / ELLIPSIS, IIRC, so I assumed that would work -- but it seems not, from your latest post (that I'm replying to here).
It's not possible to add a new doctest option in 2.5 that would allow a doctest to work under both 2.4 and 2.5: the test would blow up under 2.4, because 2.4's doctest wouldn't recognize the (new in 2.5) option, and would raise a ValueError of its own griping about the unknown option name.
[...]
"""
import decimal try: 1 / decimal.Decimal(0) except decimal.DivisionByZero: print "good" good """
Yes, that works, I see. Kind of annoying of course, but can't be helped.
Hmm, will 2.5's doctest work under Python 2.4? I guess that's not guaranteed, since I don't see any comment in doctest.py implying it needs to be compatible with old Pythons.
Oddly enough, ELLIPSIS doesn't actually work for this purpose: [...]
John
- Previous message: [Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS
- Next message: [Python-Dev] [Python-checkins] r45321 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]