Skip to content

Commit 2677dd0

Browse files
authored
Use f-strings in csv docs example (#135245)
1 parent 8d17a41 commit 2677dd0

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)