8000 Use f-strings in csv docs example (#135245) · lkollar/cpython@b9ce659 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9ce659

Browse files
ezio-melottilkollar
authored andcommitted
Use f-strings in csv docs example (python#135245)
1 parent 752953a commit b9ce659

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/csv.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ A slightly more advanced use of the reader --- catching and reporting errors::
609609
for row in reader:
610610
print(row)
611611
except csv.Error as e:
612-
sys.exit('file {}, line {}: {}'.format(filename, reader.line_num, e))
612+
sys.exit(f'file {filename}, line {reader.line_num}: {e}')
613613

614614
And while the module doesn't directly support parsing strings, it can easily be
615615
done::

0 commit comments

Comments
 (0)
0