Closed
Description
When parsing and normalizing a path, pathlib calls sys.intern()
on the string parts:
Line 273 in 96b392d
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: #112856 (comment)
Activity