[Python-Dev] Attribute error: providing type name

Nick Coghlan ncoghlan at gmail.com
Sun Nov 30 21:35:13 CET 2008

Christian Heimes wrote:
> Adam Olsen wrote:
>> I'm sure you'll get support for this, unless it's a really
>> inconvenient spot that requires a gross hack to print the type name.
>> Post a patch on the bug tracker.
> So far I can see only one argument against the proposed idea: doc tests.
>  The modified exception message would break existing doc tests.

It wouldn't be the first time we've broken doc tests that way. Since the
details of the error messages aren't guaranteed to remain the same
across releases, doctests that aren't part of Python's own test suite
really should be using IGNORE_EXCEPTION_DETAIL when checking for
exceptions that are raised directly by the interpreter or standard library.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list