https://github.com/python/cpython/commit/2677dd017a033eaaad3b8e1e0eb5664a44e7e231
commit: 2677dd017a033eaaad3b8e1e0eb5664a44e7e231
branch: main
author: Ezio Melotti <[email protected]>
committer: hauntsaninja <[email protected]>
date: 2025-06-08T15:28:37-07:00
summary:
Use f-strings in csv docs example (#135245)
files:
M Doc/library/csv.rst
diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
index 5297be17bd708e..2e513bff651cd2 100644
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -609,7 +609,7 @@ A slightly more advanced use of the reader --- catching and
reporting errors::
for row in reader:
print(row)
except csv.Error as e:
- sys.exit('file {}, line {}: {}'.format(filename, reader.line_num,
e))
+ sys.exit(f'file {filename}, line {reader.line_num}: {e}')
And while the module doesn't directly support parsing strings, it can easily be
done::
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]