OK, thanks. Mladen
On Oct 16, 4:37 pm, Minh Nguyen <nguyenmi...@gmail.com> wrote: > Hi Mladen, > > On Sat, Oct 17, 2009 at 9:18 AM, mb <bestv...@gmail.com> wrote: > > > Hi, > > > I think the following is a bug. Most of the time 1/2 is not declared > > to be 0, but it is in the following code: > > Is the following what you wanted to do? > > {{{ > [mv...@sage ~]$ sage > ---------------------------------------------------------------------- > | Sage Version 4.1.2, Release Date: 2009-10-14 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: L = [] > sage: for a in xrange(1, 2): > ....: for b in xrange(2, 3): > ....: L.append([a, b]) > ....: > sage: for item in L: > ....: print Integer(item[0]) / Integer(item[1]) > ....: > 1/2 > > }}} > > The for loops above generate Python integers, not Sage Integers. > That's why you got zeros in your original Sage session. > > -- > Regards > Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---