This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients AndersMunch, Dennis Sweeney, Kshitiz17, brandtbucher, corona10, kj, rhettinger, serhiy.storchaka
Date 2021-06-13.09:54:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623578095.82.0.0783055815132.issue44283@roundup.psfhosted.org>
In-reply-to
Content
> How common match-case statements with literal integers? 

Nothing is common yet because the feature hasn't been released ;-)

I suspect that if match-case were optimized for integer constants, they would be used.  In discussions about case statements, there are two groups, one looking for a prettier if-elif-else chain and the other looking for a fast vectored jump.  This optimization is aimed at the latter group -- they would be happy to have this opportunity to make faster code, even if it means using integer constants.
History
Date User Action Args
2021-06-13 09:54:55rhettingersetrecipients: + rhettinger, serhiy.storchaka, corona10, brandtbucher, Dennis Sweeney, AndersMunch, kj, Kshitiz17
2021-06-13 09:54:55rhettingersetmessageid: <1623578095.82.0.0783055815132.issue44283@roundup.psfhosted.org>
2021-06-13 09:54:55rhettingerlinkissue44283 messages
2021-06-13 09:54:55rhettingercreate