Searched refs:with_stem (Results 1 – 4 of 4) sorted by relevance
/external/python/cpython3/Lib/test/ |
D | test_pathlib.py | 564 self.assertEqual(P('a/b').with_stem('d'), P('a/d')) 565 self.assertEqual(P('/a/b').with_stem('d'), P('/a/d')) 566 self.assertEqual(P('a/b.py').with_stem('d'), P('a/d.py')) 567 self.assertEqual(P('/a/b.py').with_stem('d'), P('/a/d.py')) 568 self.assertEqual(P('/a/b.tar.gz').with_stem('d'), P('/a/d.gz')) 569 self.assertEqual(P('a/Dot ending.').with_stem('d'), P('a/d')) 570 self.assertEqual(P('/a/Dot ending.').with_stem('d'), P('/a/d')) 571 self.assertRaises(ValueError, P('').with_stem, 'd') 572 self.assertRaises(ValueError, P('.').with_stem, 'd') 573 self.assertRaises(ValueError, P('/').with_stem, 'd') [all …]
|
/external/python/cpython3/Doc/library/ |
D | pathlib.rst | 576 .. method:: PurePath.with_stem(stem) 582 >>> p.with_stem('final') 585 >>> p.with_stem('lib') 588 >>> p.with_stem('') 591 File "/home/antoine/cpython/default/Lib/pathlib.py", line 861, in with_stem
|
/external/python/cpython3/Lib/ |
D | pathlib.py | 876 def with_stem(self, stem): member in PurePath
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.9.0a6.rst | 406 Added :meth:`pathlib.Path.with_stem()` to create a new Path with the stem
|