> > Is this meant to produce a tuple that contains inner tuples, or is it
> the same as tuple(i for i in range(10)) ?
This would be equivalent to tuple(i for i in range(10))

> Is the comma just magic that says "tuple comprehension, not genexp"?
I think that my proposal is consistent with Python's current tuple syntax, 
especially for one element:

((1,),) # all very similar, but ((1,),)
((1,)) # (1,)
((1),) # (1,)
((1)) # 1

I would say the comma says "tuple, not expression":

(1+2)*3 # 9
(1+2,)*3 # (3, 3, 3)
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/4X3ER6UDU3XKMML4F2O5OQW5MRVL6Q5Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to