<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
28.03.18 22:05, Paul Moore пише
<blockquote type="cite"
cite="mid:CACac1F8W0zNqEk2JSHoHR6q7YF+O-8QGErAD07eqcpP2rGdkOg@mail.gmail.com">
<pre wrap="">I can't imagine (non-contrived) code where the fact that a is
formatted before b is evaluated would matter, so I'm fine with option
3.</pre>
</blockquote>
<br>
If formatting a and evaluating b both raise exceptions, the
resulting exception depends on the order.<br>
<br>
<blockquote>$ ./python -bb<br>
>>> a = b'bytes'<br>
>>> '{}{}'.format(a, b)<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
NameError: name 'b' is not defined<br>
>>> f'{a}{b}'<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
BytesWarning: str() on a bytes instance<br>
</blockquote>
<br>
</body>
</html>