MCPcopy Index your code
hub / github.com/python/cpython / with_segments

Method with_segments

Lib/test/test_pathlib/test_join.py:42–43  ·  view source on GitHub ↗
(self, *pathsegments)

Source from the content-addressed store, hash-verified

40 self.session_id = session_id
41
42 def with_segments(self, *pathsegments):
43 return type(self)(*pathsegments, session_id=self.session_id)
44 p = P('foo', 'bar', session_id=42)
45 self.assertEqual(42, (p / 'foo').session_id)
46 self.assertEqual(42, ('foo' / p).session_id)

Callers 1

test_with_segmentsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected