[issue33200] Optimize the empty set "literal"

2018-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Closed due to the lack of practical applications. Can be reopened if this idiom become popular. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___

[issue33200] Optimize the empty set "literal"

2018-04-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: I may have immediately latched onto this, dubbing it the "one-eyed monkey operator", the moment the generalized unpacking released. I always hated the lack of an empty set literal, and enjoyed having this exist just to fill

[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Does anyone seriously write "{*()}" instead of "set()"? It doesn't seem to be laughing to me. -- nosy: +pitrou ___ Python tracker

[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Don't know. :-) Consider this as a 1st April egg. -- ___ Python tracker ___

[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Mark Dickinson
Mark Dickinson added the comment: Does anyone seriously write "{*()}" instead of "set()"? -- nosy: +mark.dickinson ___ Python tracker

[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +6043 stage: -> patch review ___ Python tracker ___

[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The following PR optimizes bytecode for the empty set "literal": {*()}. Currently it is compiled to LOAD_CONST 0 (()) BUILD_SET_UNPACK 1 It will optimized to BUILD_SET0 $