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 Kodiologist
Recipients BTaskaya, JelleZijlstra, Kodiologist, benjamin.peterson, pablogsal, sobolevn
Date 2022-01-26.17:06:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643216811.33.0.691273863725.issue46520@roundup.psfhosted.org>
In-reply-to
Content
I've done very little work on CPython, but I do a lot of AST construction and call `ast.unparse` a lot in my work on Hylang, and I think this is a wart worth fixing. The real mistake was letting the user say `𝕕𝕖𝕗 = 1`, but that's been legal Python syntax for a long time, so I doubt a change to that would be welcome, especially one affecting old stable versions of Python like 3.9. Python has made its bed and now it must lie in it.

I think that with a pretty small amount of code (using code-point arithmetic instead of a dictionary with every ASCII letter), I can add Unicode "escaping" of reserved words to the part of `ast.unparse` that renders variable names. Would a patch of this kind be welcome?
History
Date User Action Args
2022-01-26 17:06:51Kodiologistsetrecipients: + Kodiologist, benjamin.peterson, JelleZijlstra, pablogsal, BTaskaya, sobolevn
2022-01-26 17:06:51Kodiologistsetmessageid: <1643216811.33.0.691273863725.issue46520@roundup.psfhosted.org>
2022-01-26 17:06:51Kodiologistlinkissue46520 messages
2022-01-26 17:06:51Kodiologistcreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.