Author yselivanov
Recipients benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, steven.daprano, yselivanov
Date 2018-02-16.17:37:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518802649.14.0.467229070634.issue32856@psf.upfronthosting.co.za>
In-reply-to
Content
I'm still not sure whether we should enable this optimization or not.

I haven't ever seen this pattern used in any Python code I worked with, so I suspect it's quite a rare hack.  Giving it a fast-path would give this pattern extra visibility and might encourage people to use it.

And the pattern itself... Well, it's quite ugly and barely readable.  IMO it's way better to simply rewrite such comprehension to an equivalent 'for' statement.

So I guess I'm -0 on this change.  I suggest to ask Guido on the mailing list if he agrees that this language patten is worth optimizing/promoting.
History
Date User Action Args
2018-02-16 17:37:29yselivanovsetrecipients: + yselivanov, brett.cannon, ncoghlan, benjamin.peterson, steven.daprano, serhiy.storchaka
2018-02-16 17:37:29yselivanovsetmessageid: <1518802649.14.0.467229070634.issue32856@psf.upfronthosting.co.za>
2018-02-16 17:37:29yselivanovlinkissue32856 messages
2018-02-16 17:37:29yselivanovcreate