Suggestion for improved ImportError message

Lie Lie.1296 at gmail.com
Sat Aug 23 18:53:50 CEST 2008


On Aug 15, 7:42 pm, bearophileH... at lycos.com wrote:
> Lie:
>
> >I'm not sure there are any reason to test for failed import in doctest)<
>
> I have code that uses numpy if available, otherwise uses slower normal
> Python code. Inside the doctests I'd like to test both situations...

Why? Is there a difference in result if you have used numpy and python
code? If that is, I smell a bad code. What numpy and python code
version would return in that situation should be the same (practically
it isn't always feasible though).

> Bye,
> bearophile




More information about the Python-list mailing list