On Sep 21, 2007, at 12:58 PM, Jaap Spies wrote:

> William Stein wrote:
>> On 9/21/07, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>>> On Sep 21, 2007, at 5:40 AM, Jaap Spies wrote:
>
>>> I don't think so, especially after resolving the issues above, but
>>> the two of us are probably equally bias about or own pieces of code.
>>> The only other person to have spoken up is William, maybe we should
>>> consider re-opening it if others speak up.
>>
>> I am biased against irange because there is already:
>>    range, xrange, srange, and xsrange,
>> and the argumetn for irange is to *lesson* confusion.
>> Having irange will mean also having xirange, and that's
>> just too many ranges for my brain.
>>
>
> Why not prelude on Python 3k, where xrange will disappear?

Python 3k is at least a year away, which is a lot time for SAGE. For  
now, we definitely need generators (for memory reasons) and lists.

> The Python long will also be obsolete, making things more simple.

I'm actually not overly optimistic about this--I am wondering if it  
will just be more hidden from the user, but we will still have to  
distinguish between long-ints and int-ints in all of our Cython code  
for many things. (Either that or ints are taking a huge performance  
hit.)

> One example in the Tutorial will make a function like irange,
> or any other better name, acceptable for users:
>
> sage: sum(i for i in irange(1,10))
> 55

I still think

sage: sum([1..10])
55

or

sage: sum(1..10)
55

is easier to type and understand. I can just see trying to explain to  
half the students in a class (who got 45) "see the little 'i' in there."

- Robert

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to