This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Antony.Lee
Recipients Antony.Lee
Date 2014-06-11.05:39:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Path.with_name can be used to construct paths containing slashes as name contents (rather than as separators), as demonstrated below.

$ python -c 'from pathlib import Path; print(Path("foo").with_name("bar/baz").name)'

This should be changed to either raise a ValueError, or behave like path.parent / new_name.  Given the amount of checking in the related with_suffix method (and the fact that the second option can be readily implemented by hand), the first option seems preferable.
Date User Action Args
2014-06-11 05:39:26Antony.Leesetrecipients: + Antony.Lee
2014-06-11 05:39:26Antony.Leesetmessageid: <>
2014-06-11 05:39:26Antony.Leelinkissue21714 messages
2014-06-11 05:39:26Antony.Leecreate