[sage-devel] Re: patch with a function irange

2007-09-20 Thread Jaap Spies
William Stein wrote: I personally think the idea of irange is very sensible.The srange function I wrote isn't very good, since it is too slow (it's not in Cython, etc.). It would be nice if irange were implemented from the start to be highly optimized, and if there were further

[sage-devel] Re: patch with a function irange

2007-09-20 Thread William Stein
On 9/20/07, Jaap Spies [EMAIL PROTECTED] wrote: Forgot to add a few examples: Thanks. This is now trac #706: http://trac.sagemath.org/sage_trac/ticket/706 sage: v = irange(0,5); v [0, 1, 2, 3, 4, 5] sage: v = irange(1,10); v [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] sage: v =

[sage-devel] Re: patch with a function irange

2007-09-19 Thread Jaap Spies
William Stein wrote: On 9/19/07, Jaap Spies [EMAIL PROTECTED] wrote: William, After the discussion in the thread 'Calculus' I added the function irange(start, stop, step=1) to misc/misc.py. I think this could be a good replacement of the operator '..' known in Maple and Matlab. Better

[sage-devel] Re: patch with a function irange

2007-09-19 Thread William Stein
On 9/19/07, Jaap Spies [EMAIL PROTECTED] wrote: def srange(a,b=None,step=1, include_endpoint=False): What does your irange do differently? And why the i? Does it mean include endpoints? That makes sense actually. I'm somehow not amused with your answer. Nevertheless I answered to