python (2.7 in my case) has a several good looking ways to define tuples:
>>> a = (1,2,3)
>>> a
(1, 2, 3)
>>> a = 1,2,3
>>> a
(1, 2, 3)
But i don't understand why you can't define tuples with "empty" values, that you can't even access from index!
>>> a = 1,
>>> a
(1,)
>>> a[0]
1
>>> a[1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: tuple index out of range
This behavior seems to be really error-prone. The second value of the tuple is "nothing", and it's not even None!
>>> a = 1,None
>>> a
(1, None)
I don't get the point of it, and it really feels like a bug. Can someone explain this behavior?