-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Speedup os.path.relpath() #117607
Copy link
Copy link
Closed
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
Proposal:
Currently both implemenatations of
relpath()are a bit inefficient. So they could use some optimisations:normpath()beforeabspath(), it already normalises it:*_restis empty:str.join()instead ofos.path.join():Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
os.path.relpath()#117608