New submission from Tim Hoffmann <tim.hoffm...@posteo.de>:

Similar to PurePath.with_name() and PurePath.with_suffix() there should be a 
PurePath.with_stem().

A common use case would be appending something before the suffix: 
path.with_stem(path.stem + '_v2')

As of now this must be written more cumbersome as:
path.with_name(path.stem + '_v2' + path.suffix)

----------
components: Library (Lib)
messages: 365540
nosy: timhoffm
priority: normal
severity: normal
status: open
title: Add PurePath.with_stem()

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40148>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to