Re: [python 2.4] unable to construct tuple with one item

2007-05-06 Thread Mel Wilson
Vyacheslav Maslov wrote: > So, the main question is why using syntax like [X] python constuct list > with > one item, but when i try to construct tuple with one item using similar > syntax (X) python do nothing? Because `(` and `)` are used in expressions to bracket sub-expressions. a = (4 + 3)

Re: [python 2.4] unable to construct tuple with one item

2007-05-06 Thread Facundo Batista
Vyacheslav Maslov wrote: > So, the main question is why using syntax like [X] python constuct list with > one item, but when i try to construct tuple with one item using similar > syntax (X) python do nothing? Because what determines that you actually have a tuple is the comma, not the parenthesi