Lie wrote:
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
On Aug 15, 7:42 pm, [EMAIL PROTECTED] 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 differ
On Aug 13, 3:55 pm, Kent Tenney <[EMAIL PROTECTED]> wrote:
> Howdy,
>
> I was just bit by
>
> from image import annotate
>
> ImportError: cannot import name annotate
>
> I found the problem via
>
> import image
> print image.__file__
>
> which made it clear that the wrong image module had been foun
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...
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 14, 5:10 pm, Wojtek Walczak
<[EMAIL PROTECTED]> wrote:
> On Thu, 14 Aug 2008 01:35:44 + (UTC), Kent Tenney wrote:
> >> > Then go for it You can prepare a patch and ask on python-dev
> >> > if the developers are interested.
>
> > hehe, I'll get a C level patch accepted right after I
> >
On Thu, 14 Aug 2008 01:35:44 + (UTC), Kent Tenney wrote:
>> > Then go for it You can prepare a patch and ask on python-dev
>> > if the developers are interested.
>
> hehe, I'll get a C level patch accepted right after I
> out-swim Mike Phelps.
It's really not that hard. The only hard thing (
> > Then go for it You can prepare a patch and ask on python-dev
> > if the developers are interested.
hehe, I'll get a C level patch accepted right after I
out-swim Mike Phelps.
> >
> > I was never hacking the import things on C level before,
> > but a hint: you have to modify import_from func
Dnia Wed, 13 Aug 2008 22:15:48 + (UTC), Wojtek Walczak napisa�(a):
> Then go for it :-) You can prepare a patch and ask on python-dev
> if the developers are interested.
>
> I was never hacking the import things on C level before,
> but a hint: you have to modify import_from function from
> Py
Kent Tenney wrote:
I was just bit by
from image import annotate
ImportError: cannot import name annotate
I found the problem via
import image
print image.__file__
which made it clear that the wrong image module had been found.
that's what "python -v" is all about, of course.
--
http:
Dnia Wed, 13 Aug 2008 20:55:38 + (UTC), Kent Tenney napisa�(a):
> from image import annotate
>
> ImportError: cannot import name annotate
>
> I found the problem via
>
> import image
> print image.__file__
>
> which made it clear that the wrong image module had been found.
>
> It would be nic
10 matches
Mail list logo