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 eric.smith
Recipients JelleZijlstra, barry, eric.smith, martin.panter, python-dev, yselivanov
Date 2015-09-13.11:39:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1442144383.82.0.613843724055.issue24965@psf.upfronthosting.co.za>
In-reply-to
Content
On 9/13/2015 12:21 AM, Martin Panter wrote:
>>>> f"{'{'}"  # Why is this allowed in an outer format expression--
> '{'
>>>> f"{3:{'{'}>10}"  # --but not inside a format specifier?

This is me being lazy about detecting recursion. I'll fix it.

>>>> f"{\x00}"  # It seems this is treated as a null terminator
>   File "<fstring>", line 1
>     (
>     ^
> SyntaxError: unexpected EOF while parsing

This is a byproduct of using PyParser_ASTFromString. I'm not particularly included to do anything about it. Is there any practical use case?

>>>> f"{'s'!\x00:.<10}"  # Default conversion is the null character?
> 's.........'

Yes, that's the default. I'll switch to -1, which I think won't have this issue.

Thanks for the review.
History
Date User Action Args
2015-09-13 11:39:43eric.smithsetrecipients: + eric.smith, barry, python-dev, martin.panter, yselivanov, JelleZijlstra
2015-09-13 11:39:43eric.smithsetmessageid: <1442144383.82.0.613843724055.issue24965@psf.upfronthosting.co.za>
2015-09-13 11:39:43eric.smithlinkissue24965 messages
2015-09-13 11:39:43eric.smithcreate