On Sun, Nov 17, 2019, at 21:39, Daniel Zeng wrote:
> Syntax for tuple comprehension, something like:
> (i, for i in range(10))
> 
> This shouldn't result in ambiguity, since generators need to be in 
> parentheses anyway:
> (i, for i in range(10)) vs (1, (i for i in range(10))) 

I think it should be (i for i in range(10),). I'd expect your syntax to make a 
generator that yields 1-tuples.
_______________________________________________
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/BRSPCPOWTRSCHDEMXKJKKST5FTUIAOSF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to