Message250557
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. |
|
Date |
User |
Action |
Args |
2015-09-13 11:39:43 | eric.smith | set | recipients:
+ eric.smith, barry, python-dev, martin.panter, yselivanov, JelleZijlstra |
2015-09-13 11:39:43 | eric.smith | set | messageid: <1442144383.82.0.613843724055.issue24965@psf.upfronthosting.co.za> |
2015-09-13 11:39:43 | eric.smith | link | issue24965 messages |
2015-09-13 11:39:43 | eric.smith | create | |
|