Martin Panter added the comment: I’m actually trying out your patch now. A couple strange errors and observations:
>>> f"{'{'}" # Why is this allowed in an outer format expression-- '{' >>> f"{3:{'{'}>10}" # --but not inside a format specifier? SyntaxError: nesting of '{' in format specifier is not allowed >>> opening = "{"; f"{3:{opening}>10}" # Workaround '{{{{{{{{{3' >>> f"{3:{'}'}<10}" # Error message is very strange! SyntaxError: missing '}' in format string expression >>> f"{\x00}" # It seems this is treated as a null terminator File "<fstring>", line 1 ( ^ SyntaxError: unexpected EOF while parsing >>> f"{'s'!\x00:.<10}" # Default conversion is the null character? 's.........' ---------- _______________________________________ 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