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 JelleZijlstra
Recipients GBeauregard, JelleZijlstra, eric.smith
Date 2022-01-27.20:09:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643314170.31.0.858815657485.issue46552@roundup.psfhosted.org>
In-reply-to
Content
I vote we don't change this. PEP 484 says:

> The string literal should contain a valid Python expression (i.e., compile(lit, '', 'eval') should be a valid code object) and it should evaluate without errors once the module has been fully loaded. 

But compile() fails for leading whitespace.

I also don't see a real use case for this. The dataclasses tests were presumably just added for completeness. If there's evidence this is a common pattern in the wild maybe we can reconsider.
History
Date User Action Args
2022-01-27 20:09:30JelleZijlstrasetrecipients: + JelleZijlstra, eric.smith, GBeauregard
2022-01-27 20:09:30JelleZijlstrasetmessageid: <1643314170.31.0.858815657485.issue46552@roundup.psfhosted.org>
2022-01-27 20:09:30JelleZijlstralinkissue46552 messages
2022-01-27 20:09:30JelleZijlstracreate