gmpy 1.0 for python 2.4 alpha 2 Windows-packaged

Aahz aahz at pythoncraft.com
Fri Sep 17 15:44:26 EDT 2004


In article <mailman.2869.1094317616.5135.python-list at python.org>,
Tim Peters  <tim.peters at gmail.com> wrote:
>
>Darn.  The new doctest ELLIPSIS directive is a good long-term approach
>to this, but you're right that it doesn't help you today.  So, in the
>*next* Python 2.4 prerelease, there will be a new
>IGNORE_EXCEPTION_DETAIL directive.  Then, e.g., this doctest passes
>under 2.3.4 and 2.2.3, and will also pass in 2.4:
>
>>>> (1, 2)[3] = 'moo' #doctest: +IGNORE_EXCEPTION_DETAIL
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>TypeError: object doesn't support item assignment
>
>Since doctest directives didn't exist before 2.4, earlier Pythons view
>them as comments, and insist on exact match.  2.4 will still insist on
>seeing a TypeError, but won't care that "doesn't" has changed to "does
>not" (or, for that matter, won't care if the actual detail is
>"Congratulations, Anna and Alex!").

Huh.  The advice I've always seen is, "Never rely on the text of an
exception -- it can change even in bugfix releases."
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"A foolish consistency is the hobgoblin of little minds, adored by little
statesmen and philosophers and divines."  --Ralph Waldo Emerson



More information about the Python-list mailing list