New GitHub issue #119518 from barneygale:<br>

<hr>

<pre>
When parsing and normalizing a path, pathlib calls `sys.intern()` on the string parts:

https://github.com/python/cpython/blob/96b392df303b2cfaea823afcb462c0b455704ce8/Lib/pathlib/_local.py#L273

I've never been able to establish that this is a worthwhile thing to do. The implementation seems incomplete, because the path normalization only occurs when a user manually initialises a path object, and not in paths generated from `path.iterdir()`, `path.walk()`, etc. Drives/roots/anchors aren't interned despite most likely to be shared.

Previous discussion: https://github.com/python/cpython/pull/112856#issuecomment-1850272228
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/119518">View on GitHub</a>
<p>Labels: performance, topic-pathlib</p>
<p>Assignee: </p>