[sage-devel] Re: Indexing of symbolic expressions

2012-11-18 Thread Keshav Kini
Jason Grout writes: > On 11/5/12 7:40 PM, Michael Orlitzky wrote: >> I didn't realize foo[1,2] would pass the tuple (1,2) to __getitem__ >> until the very end, so it would make sense to go back and replace the >> function calls with indexing. >> >> I think the only thing we'd lose is a() -> 'a', a

Re: [sage-devel] Re: Indexing of symbolic expressions

2012-11-11 Thread Michael Orlitzky
On 11/11/2012 05:25 AM, Burcin Erocal wrote: > > Thanks for pointing this out Jean-Pierre. Here is the ticket: > > http://trac.sagemath.org/sage_trac/ticket/11576 > > I don't remember if the patch attached to the ticket is the most recent > one. This might be better: > > http://sage.math.washin

Re: [sage-devel] Re: Indexing of symbolic expressions

2012-11-11 Thread Burcin Erocal
Hi, On Sat, 10 Nov 2012 19:16:55 -0800 (PST) Jean-Pierre Flori wrote: > IIRC there was some work about this done (but not merged?). > No time to search myself now, but searching trac and the pynac-devel > list should give some hints, or contacting Burcin and or Florent > Hivert. Thanks for poin

Re: [sage-devel] Re: Indexing of symbolic expressions

2012-11-10 Thread Jean-Pierre Flori
IIRC there was some work about this done (but not merged?). No time to search myself now, but searching trac and the pynac-devel list should give some hints, or contacting Burcin and or Florent Hivert. On Wednesday, November 7, 2012 8:25:24 AM UTC-6, Michael Orlitzky wrote: > > On 11/06/2012 10:5

Re: [sage-devel] Re: Indexing of symbolic expressions

2012-11-07 Thread Michael Orlitzky
On 11/06/2012 10:51 PM, Andrey Novoseltsev wrote: > On Nov 6, 7:14 am, Jason Grout wrote: >> What about a[None] returning a? That's a little awkward, I guess. >> >> Thanks, >> >> Jason > > I would never think that a[None] would return a, whatever a is! I'd > expect something "empty"... I've jus

[sage-devel] Re: Indexing of symbolic expressions

2012-11-06 Thread Andrey Novoseltsev
On Nov 6, 7:14 am, Jason Grout wrote: > What about a[None] returning a?  That's a little awkward, I guess. > > Thanks, > > Jason I would never think that a[None] would return a, whatever a is! I'd expect something "empty"... Andrey -- You received this message because you are subscribed to the

[sage-devel] Re: Indexing of symbolic expressions

2012-11-06 Thread Jason Grout
On 11/5/12 7:40 PM, Michael Orlitzky wrote: On 11/05/2012 05:05 PM, Jason Grout wrote: Very nice! In the spirit of Python [1], "There should be one-- and preferably only one --obvious way to do it.", may I suggest that you pick one indexing convention (e.g., round or square brackets) and use t

Re: [sage-devel] Re: Indexing of symbolic expressions

2012-11-05 Thread Michael Orlitzky
On 11/05/2012 05:05 PM, Jason Grout wrote: > > Very nice! > > In the spirit of Python [1], "There should be one-- and preferably only > one --obvious way to do it.", may I suggest that you pick one indexing > convention (e.g., round or square brackets) and use that? I'd suggest > using square

[sage-devel] Re: Indexing of symbolic expressions

2012-11-05 Thread Jason Grout
On 11/5/12 3:52 PM, Michael Orlitzky wrote: On 11/05/12 12:40, Jason Grout wrote: On 11/4/12 11:14 AM, Michael Orlitzky wrote: I'm playing around with different ways to create collections of symbolic variables. I though it would be nice to be able to chain subscripts, e.g., sage: x[1][2]

Re: [sage-devel] Re: Indexing of symbolic expressions

2012-11-05 Thread Michael Orlitzky
On 11/05/12 12:40, Jason Grout wrote: > On 11/4/12 11:14 AM, Michael Orlitzky wrote: >> I'm playing around with different ways to create collections of symbolic >> variables. I though it would be nice to be able to chain subscripts, >> e.g., >> >>sage: x[1][2] >>x12 >>sage: latex(x[1][2

[sage-devel] Re: Indexing of symbolic expressions

2012-11-05 Thread Jason Grout
On 11/4/12 11:14 AM, Michael Orlitzky wrote: I'm playing around with different ways to create collections of symbolic variables. I though it would be nice to be able to chain subscripts, e.g., sage: x[1][2] x12 sage: latex(x[1][2]) x_{1}_{2} Why not do: x[1,2] to save typing and