Comment #14 on issue 2406 by renato.c...@gmail.com: improve Tuple constructor
http://code.google.com/p/sympy/issues/detail?id=2406

I don't think there's any way to accomodate the signature of builtin tuple() and the invariant imposed by `type(obj)(*obj.args) == obj` (issue 2070).

Suppose that Tuple does satisfy `type(Tuple())([1, 2, 3]) == Tuple(1, 2, 3)`

Then we would have, by the invariant, `Tuple(1, 2, 3).args == ([1, 2, 3], )`. But actually this is not right, because it shouldn't have a list inside, but a Tuple, so `Tuple(1, 2, 3).args == (Tuple(1, 2, 3), )`.

Now there's a funny thing: if one tries to reach the elements (1, 2 and 3) only through `.args`, it's impossible, because `Tuple(1, 2, 3).args[0]` is again `Tuple(1, 2, 3)`!

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to