Eric V. Smith added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24965> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com