Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.

This commit is contained in:
Eric V. Smith 2016-09-09 21:56:20 -04:00
parent 052828db15
commit 451d0e38fc
9 changed files with 321 additions and 341 deletions

View file

@ -1060,7 +1060,7 @@ class HTTPConnection:
if encode_chunked and self._http_vsn == 11:
# chunked encoding
chunk = f'{len(chunk):X}''\r\n'.encode('ascii') + chunk \
chunk = f'{len(chunk):X}\r\n'.encode('ascii') + chunk \
+ b'\r\n'
self.send(chunk)