[Tutor] t = (1, *(2, 3))

Jabin Jezreel jabinjezreel at gmail.com
Thu May 14 03:36:19 CEST 2009


I am not allowed to do
>>> t = (1, *(2, 3))

But I am allowed to do
>>> def ts(*t):
...    return t
...
>>> ts(1, *(2, 3))
(1, 2, 3)

I realize I can do
>>> (1,) + (2,3)
(1, 2, 3)

What is the rationale behind not having t = (1, *(2, 3))
have the same semantics as the "ts" case above?


More information about the Tutor mailing list