Dick Moores | 18 Jul 14:35

Seems to be a bug in the verbose setting

I'm trying out   xmode Verbose   in my ipythonrc.ini .  I think I see a bug.

I have a module with a bunch of functions in it. I have IPython 
import all of these when it starts. One is asin_deg().

=================================================
In [2]: asin_deg(2)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

E:\Python25\Scripts\<ipython console> in <module>()

E:\Python25\lib\site-packages\mine\mycalc.pyc in asin_deg(a=2, c=1)
      38     """
      39     from math import asin, degrees
---> 40     return degrees(asin(a*1.0/c))
         global Setting = undefined
         global sig_digits = undefined
         global to = undefined
         global will = undefined
         global set = undefined
         global it = undefined
      41
      42 def cos_deg(n):

ValueError: math domain error
===================================================

Of course, the  'ValueError: math domain error' is correct.  For 
asin_deg(x),  -1 < x < 1 must hold.
(Continue reading)

Fernando Perez | 19 Jul 09:55

Re: Seems to be a bug in the verbose setting

On Fri, Jul 18, 2008 at 5:37 AM, Dick Moores <rdm <at> rcblue.com> wrote:
> I'm trying out   xmode Verbose   in my ipythonrc.ini .  I think I see a bug.
>
> I have a module with a bunch of functions in it. I have IPython
> import all of these when it starts. One is asin_deg().

Yup.  That code is, unfortunately, very tricky and we so far hadn't
had proper testing in  place to prevent regressions like these.  It
would be great if you could make a ticket on launchpad for this, along
with an example (if you can put even a stripped version of your code).
 This will let us track the problem and add a real test for it once we
fix it (post 0.9).

Cheers,

f

Gmane