I have a doctest where I test a float conversion:
>>> float('fish')
In Python < 2.7 this results in:
ValueError: invalid literal for float(): fish
In Python 2.7 the result is
ValueError: could not convert string to float: fish
Can I make both these results acceptable in my doctest?