| 1 | initial version |
It is not a bug. When you write s(2), Sage preparse the 2 so that it is the Integer 2, not the Python int 2. With such Sage integers, the division leads to a Sage Rational. Now, when you use the range function, it produces Python ints, which explains your problem. If you want to generate a list of Sage Integers, you should use the srange function instead of range.
| 2 | No.2 Revision |
It is not a bug. When you write s(2), Sage preparse the 2 so that it is the Sage Integer 2, not the Python int 2. With such Sage integers, the division leads to a Sage Rational. Now, when you use the range function, it produces Python ints, which explains your problem. If you want to generate a list of Sage Integers, you should use the srange function instead of range.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.