In normal Python the main purpose of list is to be mutable. When you
want an immutable list you can use tuple.

If SymPy had List would it be mutable? If so then it couldn't be a
Basic subclass. If not what purpose would it serve?

On Tue, 4 Jun 2019 at 04:46, Chris Smith <smi...@gmail.com> wrote:
>
> From discussion at #16926 where I suggest that perhaps we should be naming 
> ArrayComprehension as List and it was said,
>
> > [ArrayComprehension] is supposed to be a multidimensional list comprehension
>
> It looks like an unevaluated List to me: `List(i + j, (i,0,3), (j,0,4))` is 
> the unevaluated form of `[i + j for i in range(4) for j in range(5)]`. (For 
> comparison, Integral and Sum are examples of an unevaluated Expr, which, 
> after a doit and the right conditions, lose the wrapper and become other 
> Expr.)
>
> An evaluated form would be `List([1, 2, 3, 4])` where the `[]` would be 
> necessary to distinguish between the evaluated and comprehension form.
>
> Are we going to regret introducing an object that is so closely related to a 
> list or will we always want a list to be an unsympified object in SymPy?
>
> /c
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/f98dd475-7c90-4d3f-827e-f14480272693%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxQkrpKeZKboUQdvZ%3Dd3HQ_U2BOht_9VfSP1pszhWKxQ1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to