On Jul 12, 2008, at 1:22 PM, Mats wrote: > Clarification: I would like fast ints&reals, with 2/3=0.6666, and not > 2/3=0, but I cannot figure out how to do this in notebook mode.
Hi Mats, If you build from source, you can apply the attached patch file to get future division *everywhere* in the notebook. This is an ugly hack though, and won't go into Sage as is. For a permanent solution, one possibility is to add a "% futuredivision" command that you could enter at the top of the cell. The problem is, under the current framework, this would only affect that cell, which is probably not what you want. There aren't any other "%thing" commands currently that affect *everything* in the notebook. So architecturally, I'm not sure how we would deal with this. There was a brief discussion in IRC a few minutes ago. You won't get the "from __future__ import division" statement working in a notebook cell, because that needs to appear at the top of a script (see http://www.python.org/dev/peps/pep-0236/), and affects the parser itself, it's not an ordinary import statement. The notebook prepends a bunch of stuff to the notebook cell input before it gets passed to python. david --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
futuredivision.patch
Description: Binary data