Hello !!

I am writing about a problem I had some time ago. Minh helped me to sort it
out. This time, I found an ugly trick, which is fine for the moment ( see
patch #7314 and the Integer(1) instead of 1 at line 6000 of patch
http://trac.sagemath.org/sage_trac/attachment/ticket/7314/trac_7314.patch)....
I talked about it with timdumol on IRC, but we had no idea of how to fix it.
Here is the problem :

Create a file "aaa" containing :
def a(b=8):
    return b/3

Then, in Sage :


sage: def a(b=8):
....:         return b/3
....:
sage: a()
8/3
sage: execfile("aaa")
sage: a()
2

There is some nasty rounding there, which should not occur. I know the
result could have been different, if I had used "load" instead of
"execfile". Well, I had the same problem when defining a function in the
Graph class, for which this answer is not admissible.

This kind of bug is not just confusing, it is also the kind of things that
could take hours to debug when the users does not know about it. It is
almost impossible to to it anyway if you do not suspect such a thing. What
could we do about it ?

Nathann

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to