Message250548
| Author |
martin.panter |
| Recipients |
JelleZijlstra, barry, eric.smith, martin.panter, python-dev, yselivanov |
| Date |
2015年09月13日.04:21:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1442118081.73.0.245315372119.issue24965@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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.........' |
|