[IPython-user] Macros & slice notation

Fernando Perez Fernando.Perez at colorado.edu
Sat Dec 31 16:03:45 CST 2005


Ville Vainio wrote:
> On 12/30/05, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> 
> 
>>recipe for unnecessary confusion (think perl).  I'd rather have one, good and
>>intuitive way to do it: the human brain (at least mine :) is good at
>>remembering specific use cases, as long as they remain reasonably orthogonal.
> 
> 
> Well, if you want an intuitive way, I think it speaks directly for 1-3
> as 1..3! :-)
> 
> 1:4 is always a gotcha, one extra thing to remember, one extra brain
> cycle, one thing that stops you from getting the direct "do what I
> mean" experience. Because it's a %magic it basically boils down to
> "what feels most comfortable", not "what is just like the rest of
> python". Think $var string interpolation etc.
> 
> Plus, you are bumping the major version number so this is your break
> at changing it. :-).

OK, N-M it is then.  I agree with your arguments about "magics are not python 
already, so let's just make them as convenient to use as possible".  As for 
N--M, it's too latex-y for my taste (if we were to use proper math notation, 
we'd allow [N,M) for N...M-1, [N,M] for N..M, etc :).

I'll code in the patches in a minute and will commit later.

Cheers,

f




More information about the IPython-user mailing list