[issue40148] Add PurePath.with_stem()

2020-12-26 Thread Qi Yao
Qi Yao added the comment: In Pathlib, we have functions "with_name()""with_stem()""with_suffix()" to modify the file name in the path. In issue21798:"Allow adding Path or str to Path", it actually also want to modify the file name, that is "appand string to file name". if with_stem() more c

[issue40148] Add PurePath.with_stem()

2020-04-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue40148] Add PurePath.with_stem()

2020-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 8aea4b3605059e243f1827d9328d6fc8d698c0a7 by Tim Hoffmann in branch 'master': bpo-40148: Add PurePath.with_stem() (GH-19295) https://github.com/python/cpython/commit/8aea4b3605059e243f1827d9328d6fc8d698c0a7 -- _

[issue40148] Add PurePath.with_stem()

2020-04-02 Thread Brett Cannon
Brett Cannon added the comment: I personally would rather not add more methods that are doing simple string manipulations. -- nosy: +brett.cannon ___ Python tracker ___ _

[issue40148] Add PurePath.with_stem()

2020-04-01 Thread SilentGhost
Change by SilentGhost : -- nosy: +pitrou type: -> enhancement versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mai

[issue40148] Add PurePath.with_stem()

2020-04-01 Thread Tim Hoffmann
Change by Tim Hoffmann : -- keywords: +patch pull_requests: +18654 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19295 ___ Python tracker ___ ___

[issue40148] Add PurePath.with_stem()

2020-04-01 Thread Tim Hoffmann
New submission from Tim Hoffmann : 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.wi