#15885: Consider deprecating MatrixSpace(...)[index]
-----------------------------------------+-----------------------------
       Reporter:  mmezzarobba            |        Owner:
           Type:  task                   |       Status:  new
       Priority:  major                  |    Milestone:  sage-wishlist
      Component:  user interface         |   Resolution:
       Keywords:  getitem, matrix rings  |    Merged in:
        Authors:                         |    Reviewers:
Report Upstream:  N/A                    |  Work issues:
         Branch:                         |       Commit:
   Dependencies:                         |     Stopgaps:
-----------------------------------------+-----------------------------
Description changed by mmezzarobba:

Old description:

> Expressions such as `R['x']` and `R[sqrt(2)]` are frequently used in Sage
> to denote various kinds of ring extensions. But `R[n]` could also refer
> to the `n`-th element of `R`. This second meaning is implemented in the
> case of matrix rings, and does not look very useful in this case, or in
> fact for parents in general except for very special cases. Furthermore,
> having `__getitem__` do two unrelated things depending on its argument is
> confusing, and will get even more so if some parents start supporting
> both, say, `R[I]` and `R[42]`. So we should consider deprecating
> `R[index]` and providing a method such as `unrank()` instead.
>
> See also http://trac.sagemath.org/ticket/8389#comment:13

New description:

 Expressions such as `R['x']` and `R[sqrt(2)]` are frequently used in Sage
 to denote various kinds of ring extensions. But `R[n]` could also refer to
 the `n`-th element of `R`. This second meaning is implemented in the case
 of matrix rings, and does not look very useful in this case, or in fact
 for parents in general except for very special cases. Furthermore, having
 `__getitem__` do two unrelated things depending on its argument is
 confusing, and will get even more so if some parents start supporting
 both, say, `R[I]` and `R[42]`. So we should consider deprecating
 `R[index]` and providing a method such as `unrank()` instead.

 See also http://trac.sagemath.org/ticket/8389#comment:13, #12955.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/15885#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to