[issue39784] Tuple comprehension

2020-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'pending' is a worthless state because any subsequent post changes back to 'open'. -- stage: -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue39784] Tuple comprehension

2020-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: -1 also, not worth the cost, so I would not bother with python-ideas. -- nosy: +terry.reedy status: pending -> open ___ Python tracker ___

[issue39784] Tuple comprehension

2020-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: Regarding performance, on my computer, the overhead of calling tuple() on a list comp ranges from about 30% for tiny sequences down to about 5% for largish sequences. Tiny sequences are fast either way: [steve@ando cpython]$ ./python -m timeit "[i for i

[issue39784] Tuple comprehension

2020-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: This was discussed on Python-Ideas: https://mail.python.org/archives/list/python-id...@python.org/message/LSGZF3G4RFVTKXB5Y2EW5USL2JANG5RS/ and on Discuss: https://discuss.python.org/t/why-no-tuple-comprehension/2820/1 In both cases the consensus was

[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: This change needs to be discussed first on Python-ideas, and ideally needs a PEP (and a sponsor). So you should post it on Python-ideas mailing list or discuss.python.org Ideas section. -- nosy: +BTaskaya ___

[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- Removed message: https://bugs.python.org/msg362898 ___ Python tracker ___ ___ Python-bugs-list

[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: This change needs to be discussed first on Python-ideas, and ideally needs a PEP (and a sponsor). So you should post it on Python-ideas mailing list or discuss.python.org Ideas section. -- nosy: +Batuhan Taskaya

[issue39784] Tuple comprehension

2020-02-28 Thread Marco Sulla
New submission from Marco Sulla : I think a tuple comprehension could be very useful. Currently, the only way to efficiently create a tuple from a comprehension is to create a list comprehension (generator comprehensions are more slow) and convert it with `tuple()`. A tuple comprehension