mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162)
This commit is contained in:
parent
b44ffc8b40
commit
e8acc865a3
4 changed files with 4 additions and 3 deletions
|
@ -43,7 +43,7 @@ Unpack a MIME message into a directory of files.
|
|||
if not ext:
|
||||
# Use a generic bag-of-bits extension
|
||||
ext = '.bin'
|
||||
filename = 'part-%03d%s' % (counter, ext)
|
||||
filename = f'part-{counter:03d}{ext}'
|
||||
counter += 1
|
||||
with open(os.path.join(args.directory, filename), 'wb') as fp:
|
||||
fp.write(part.get_payload(decode=True))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue