79244153

Date: 2024-12-02 12:53:44
Score: 0.5
Natty:
Report link

An f-string is probably most concise:

>>> import pathlib
>>> p = pathlib.Path( '/some/where/file/name.log' )
>>> p.with_suffix( f'{p.suffix}.bz2' )
PosixPath( '/some/where/file/name.log.bz2' )
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: gjvc